Fix formatting and interfaces in nearly every file
This commit is contained in:
@@ -11,6 +11,6 @@ use App\Interfaces\Enum;
|
||||
class AcarsType extends Enum
|
||||
{
|
||||
public const FLIGHT_PATH = 0;
|
||||
public const ROUTE = 1;
|
||||
public const LOG = 2;
|
||||
public const ROUTE = 1;
|
||||
public const LOG = 2;
|
||||
}
|
||||
|
||||
@@ -11,10 +11,10 @@ use App\Interfaces\Enum;
|
||||
class ActiveState extends Enum
|
||||
{
|
||||
public const INACTIVE = 0;
|
||||
public const ACTIVE = 1;
|
||||
public const ACTIVE = 1;
|
||||
|
||||
public static $labels = [
|
||||
ActiveState::INACTIVE => 'Inactive',
|
||||
ActiveState::ACTIVE => 'Active',
|
||||
ActiveState::INACTIVE => 'Inactive',
|
||||
ActiveState::ACTIVE => 'Active',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -15,8 +15,8 @@ class AircraftState extends Enum
|
||||
public const IN_AIR = 2;
|
||||
|
||||
public static $labels = [
|
||||
AircraftState::PARKED => 'On Ground',
|
||||
AircraftState::IN_USE => 'In Use',
|
||||
AircraftState::IN_AIR => 'In Air',
|
||||
AircraftState::PARKED => 'On Ground',
|
||||
AircraftState::IN_USE => 'In Use',
|
||||
AircraftState::IN_AIR => 'In Air',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -10,17 +10,17 @@ use App\Interfaces\Enum;
|
||||
*/
|
||||
class AircraftStatus extends Enum
|
||||
{
|
||||
public const STORED = 0;
|
||||
public const ACTIVE = 1;
|
||||
public const RETIRED = 2;
|
||||
public const SCRAPPED = 3;
|
||||
public const STORED = 0;
|
||||
public const ACTIVE = 1;
|
||||
public const RETIRED = 2;
|
||||
public const SCRAPPED = 3;
|
||||
public const WRITTEN_OFF = 4;
|
||||
|
||||
public static $labels = [
|
||||
AircraftStatus::STORED => 'Stored',
|
||||
AircraftStatus::ACTIVE => 'Active',
|
||||
AircraftStatus::RETIRED => 'Retired',
|
||||
AircraftStatus::SCRAPPED => 'Scrapped',
|
||||
AircraftStatus::STORED => 'Stored',
|
||||
AircraftStatus::ACTIVE => 'Active',
|
||||
AircraftStatus::RETIRED => 'Retired',
|
||||
AircraftStatus::SCRAPPED => 'Scrapped',
|
||||
AircraftStatus::WRITTEN_OFF => 'Written Off',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ use App\Interfaces\Enum;
|
||||
*/
|
||||
class AnalyticsDimensions extends Enum
|
||||
{
|
||||
public const PHP_VERSION = 1;
|
||||
public const PHP_VERSION = 1;
|
||||
public const DATABASE_VERSION = 2;
|
||||
public const PHPVMS_VERSION = 3;
|
||||
public const PHPVMS_VERSION = 3;
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ use App\Interfaces\Enum;
|
||||
|
||||
/**
|
||||
* Class AnalyticsMetrics
|
||||
* Metrics IDs used in Google Analytics
|
||||
* @package App\Models\Enums
|
||||
*/
|
||||
class AnalyticsMetrics extends Enum
|
||||
|
||||
@@ -8,8 +8,8 @@ use App\Interfaces\Enum;
|
||||
* Class Days
|
||||
* @package App\Models\Enums
|
||||
*/
|
||||
class Days extends Enum {
|
||||
|
||||
class Days extends Enum
|
||||
{
|
||||
public const MONDAY = 1 << 0;
|
||||
public const TUESDAY = 1 << 1;
|
||||
public const WEDNESDAY = 1 << 2;
|
||||
@@ -19,12 +19,12 @@ class Days extends Enum {
|
||||
public const SUNDAY = 1 << 6;
|
||||
|
||||
protected static $labels = [
|
||||
Days::MONDAY => 'system.days.mon',
|
||||
Days::TUESDAY => 'system.days.tues',
|
||||
Days::WEDNESDAY => 'system.days.wed',
|
||||
Days::THURSDAY => 'system.days.thurs',
|
||||
Days::FRIDAY => 'system.days.fri',
|
||||
Days::SATURDAY => 'system.days.sat',
|
||||
Days::SUNDAY => 'system.days.sun',
|
||||
Days::MONDAY => 'system.days.mon',
|
||||
Days::TUESDAY => 'system.days.tues',
|
||||
Days::WEDNESDAY => 'system.days.wed',
|
||||
Days::THURSDAY => 'system.days.thurs',
|
||||
Days::FRIDAY => 'system.days.fri',
|
||||
Days::SATURDAY => 'system.days.sat',
|
||||
Days::SUNDAY => 'system.days.sun',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -8,15 +8,15 @@ use App\Interfaces\Enum;
|
||||
* Class ExpenseType
|
||||
* @package App\Models\Enums
|
||||
*/
|
||||
class ExpenseType extends Enum {
|
||||
|
||||
public const FLIGHT = 0;
|
||||
public const DAILY = 1;
|
||||
public const MONTHLY = 2;
|
||||
class ExpenseType extends Enum
|
||||
{
|
||||
public const FLIGHT = 0;
|
||||
public const DAILY = 1;
|
||||
public const MONTHLY = 2;
|
||||
|
||||
protected static $labels = [
|
||||
ExpenseType::FLIGHT => 'Flight',
|
||||
ExpenseType::DAILY => 'Daily',
|
||||
ExpenseType::MONTHLY => 'Monthly',
|
||||
ExpenseType::FLIGHT => 'Flight',
|
||||
ExpenseType::DAILY => 'Daily',
|
||||
ExpenseType::MONTHLY => 'Monthly',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -8,15 +8,15 @@ use App\Interfaces\Enum;
|
||||
* Class FlightType
|
||||
* @package App\Models\Enums
|
||||
*/
|
||||
class FlightType extends Enum {
|
||||
|
||||
public const PASSENGER = 0;
|
||||
public const CARGO = 1;
|
||||
public const CHARTER = 2;
|
||||
class FlightType extends Enum
|
||||
{
|
||||
public const PASSENGER = 0;
|
||||
public const CARGO = 1;
|
||||
public const CHARTER = 2;
|
||||
|
||||
protected static $labels = [
|
||||
FlightType::PASSENGER => 'Passenger',
|
||||
FlightType::CARGO => 'Cargo',
|
||||
FlightType::CHARTER => 'Charter',
|
||||
FlightType::PASSENGER => 'Passenger',
|
||||
FlightType::CARGO => 'Cargo',
|
||||
FlightType::CHARTER => 'Charter',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -8,15 +8,15 @@ use App\Interfaces\Enum;
|
||||
* Class FuelType
|
||||
* @package App\Models\Enums
|
||||
*/
|
||||
class FuelType extends Enum {
|
||||
|
||||
public const LOW_LEAD = 0;
|
||||
public const JET_A = 1;
|
||||
public const MOGAS = 2;
|
||||
class FuelType extends Enum
|
||||
{
|
||||
public const LOW_LEAD = 0;
|
||||
public const JET_A = 1;
|
||||
public const MOGAS = 2;
|
||||
|
||||
protected static $labels = [
|
||||
FuelType::LOW_LEAD => '100LL',
|
||||
FuelType::JET_A => 'JET A',
|
||||
FuelType::MOGAS => 'MOGAS',
|
||||
FuelType::LOW_LEAD => '100LL',
|
||||
FuelType::JET_A => 'JET A',
|
||||
FuelType::MOGAS => 'MOGAS',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -5,11 +5,11 @@ namespace App\Models\Enums;
|
||||
use App\Interfaces\Enum;
|
||||
|
||||
/**
|
||||
* Class AcarsType
|
||||
* Class JournalType
|
||||
* @package App\Models\Enums
|
||||
*/
|
||||
class JournalType extends Enum
|
||||
{
|
||||
public const AIRLINE = 0;
|
||||
public const USER = 1;
|
||||
public const USER = 1;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Enums;
|
||||
|
||||
use App\Interfaces\Enum;
|
||||
@@ -11,19 +12,19 @@ use App\Interfaces\Enum;
|
||||
*/
|
||||
class NavaidType extends Enum
|
||||
{
|
||||
public const VOR = 1 << 0;
|
||||
public const VOR_DME = 1 << 1;
|
||||
public const LOC = 1 << 4;
|
||||
public const LOC_DME = 1 << 5;
|
||||
public const NDB = 1 << 6;
|
||||
public const TACAN = 1 << 7;
|
||||
public const UNKNOWN = 1 << 8;
|
||||
public const INNER_MARKER = 1 << 9;
|
||||
public const OUTER_MARKER = 1 << 10;
|
||||
public const FIX = 1 << 11;
|
||||
public const ANY_VOR = NavaidType::VOR | NavaidType::VOR_DME;
|
||||
public const ANY_LOC = NavaidType::LOC | NavaidType::LOC_DME;
|
||||
public const ANY = (NavaidType::UNKNOWN << 1) - 1;
|
||||
public const VOR = 1 << 0;
|
||||
public const VOR_DME = 1 << 1;
|
||||
public const LOC = 1 << 4;
|
||||
public const LOC_DME = 1 << 5;
|
||||
public const NDB = 1 << 6;
|
||||
public const TACAN = 1 << 7;
|
||||
public const UNKNOWN = 1 << 8;
|
||||
public const INNER_MARKER = 1 << 9;
|
||||
public const OUTER_MARKER = 1 << 10;
|
||||
public const FIX = 1 << 11;
|
||||
public const ANY_VOR = NavaidType::VOR | NavaidType::VOR_DME;
|
||||
public const ANY_LOC = NavaidType::LOC | NavaidType::LOC_DME;
|
||||
public const ANY = (NavaidType::UNKNOWN << 1) - 1;
|
||||
|
||||
/**
|
||||
* Names and titles
|
||||
|
||||
@@ -11,7 +11,7 @@ use App\Interfaces\Enum;
|
||||
class PirepSource extends Enum
|
||||
{
|
||||
public const MANUAL = 0;
|
||||
public const ACARS = 1;
|
||||
public const ACARS = 1;
|
||||
|
||||
protected static $labels = [
|
||||
PirepSource::MANUAL => 'Manual',
|
||||
|
||||
@@ -8,21 +8,21 @@ use App\Interfaces\Enum;
|
||||
* Class PirepState
|
||||
* @package App\Models\Enums
|
||||
*/
|
||||
class PirepState extends Enum {
|
||||
|
||||
public const REJECTED = -1;
|
||||
public const IN_PROGRESS = 0; // flight is ongoing
|
||||
public const PENDING = 1; // waiting admin approval
|
||||
public const ACCEPTED = 2;
|
||||
public const CANCELLED = 3;
|
||||
public const DELETED = 4;
|
||||
class PirepState extends Enum
|
||||
{
|
||||
public const REJECTED = -1;
|
||||
public const IN_PROGRESS = 0; // flight is ongoing
|
||||
public const PENDING = 1; // waiting admin approval
|
||||
public const ACCEPTED = 2;
|
||||
public const CANCELLED = 3;
|
||||
public const DELETED = 4;
|
||||
|
||||
protected static $labels = [
|
||||
PirepState::REJECTED => 'system.pireps.state.rejected',
|
||||
PirepState::IN_PROGRESS => 'system.pireps.state.in_progress',
|
||||
PirepState::PENDING => 'system.pireps.state.pending',
|
||||
PirepState::ACCEPTED => 'system.pireps.state.accepted',
|
||||
PirepState::CANCELLED => 'system.pireps.state.cancelled',
|
||||
PirepState::DELETED => 'system.pireps.state.deleted',
|
||||
PirepState::REJECTED => 'system.pireps.state.rejected',
|
||||
PirepState::IN_PROGRESS => 'system.pireps.state.in_progress',
|
||||
PirepState::PENDING => 'system.pireps.state.pending',
|
||||
PirepState::ACCEPTED => 'system.pireps.state.accepted',
|
||||
PirepState::CANCELLED => 'system.pireps.state.cancelled',
|
||||
PirepState::DELETED => 'system.pireps.state.deleted',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -11,15 +11,15 @@ use App\Interfaces\Enum;
|
||||
*/
|
||||
class PirepStatus extends Enum
|
||||
{
|
||||
public const PREFILE = 0;
|
||||
public const SCHEDULED = 0;
|
||||
public const ENROUTE = 1;
|
||||
public const ARRIVED = 2;
|
||||
public const PREFILE = 0;
|
||||
public const SCHEDULED = 0;
|
||||
public const ENROUTE = 1;
|
||||
public const ARRIVED = 2;
|
||||
|
||||
protected static $labels = [
|
||||
PirepStatus::PREFILE => 'Prefiled',
|
||||
PirepStatus::SCHEDULED => 'Scheduled',
|
||||
PirepStatus::ENROUTE => 'Enroute',
|
||||
PirepStatus::ARRIVED => 'Arrived',
|
||||
PirepStatus::PREFILE => 'Prefiled',
|
||||
PirepStatus::SCHEDULED => 'Scheduled',
|
||||
PirepStatus::ENROUTE => 'Enroute',
|
||||
PirepStatus::ARRIVED => 'Arrived',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -17,10 +17,10 @@ class UserState extends Enum
|
||||
public const SUSPENDED = 4;
|
||||
|
||||
protected static $labels = [
|
||||
UserState::PENDING => 'Pending',
|
||||
UserState::ACTIVE => 'Active',
|
||||
UserState::REJECTED => 'Rejected',
|
||||
UserState::ON_LEAVE => 'On Leave',
|
||||
UserState::SUSPENDED => 'Suspended',
|
||||
UserState::PENDING => 'Pending',
|
||||
UserState::ACTIVE => 'Active',
|
||||
UserState::REJECTED => 'Rejected',
|
||||
UserState::ON_LEAVE => 'On Leave',
|
||||
UserState::SUSPENDED => 'Suspended',
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user