Set access modifier on all enums (php 7.1)

This commit is contained in:
Nabeel Shahzad 2018-02-10 14:06:25 -06:00
parent e6290c3396
commit 7a527f2ed3
13 changed files with 55 additions and 56 deletions

View File

@ -8,7 +8,7 @@ namespace App\Models\Enums;
*/
class AcarsType extends EnumBase
{
const FLIGHT_PATH = 0;
const ROUTE = 1;
const LOG = 2;
public const FLIGHT_PATH = 0;
public const ROUTE = 1;
public const LOG = 2;
}

View File

@ -8,9 +8,9 @@ namespace App\Models\Enums;
*/
class AircraftState extends EnumBase
{
const PARKED = 0;
const IN_USE = 1;
const IN_AIR = 2;
public const PARKED = 0;
public const IN_USE = 1;
public const IN_AIR = 2;
public static $labels = [
AircraftState::PARKED => 'On Ground',

View File

@ -8,7 +8,7 @@ namespace App\Models\Enums;
*/
class AnalyticsDimensions
{
const PHP_VERSION = 1;
const DATABASE_VERSION = 2;
const PHPVMS_VERSION = 3;
public const PHP_VERSION = 1;
public const DATABASE_VERSION = 2;
public const PHPVMS_VERSION = 3;
}

View File

@ -9,5 +9,5 @@ namespace App\Models\Enums;
class AnalyticsMetrics
{
# Track the lookup time for airports from vaCentral
const AIRPORT_LOOKUP_TIME = 1;
public const AIRPORT_LOOKUP_TIME = 1;
}

View File

@ -11,13 +11,13 @@ namespace App\Models\Enums;
*/
class Days extends EnumBase {
const MONDAY = 1 << 0;
const TUESDAY = 1 << 1;
const WEDNESDAY = 1 << 2;
const THURSDAY = 1 << 3;
const FRIDAY = 1 << 4;
const SATURDAY = 1 << 5;
const SUNDAY = 1 << 6;
public const MONDAY = 1 << 0;
public const TUESDAY = 1 << 1;
public const WEDNESDAY = 1 << 2;
public const THURSDAY = 1 << 3;
public const FRIDAY = 1 << 4;
public const SATURDAY = 1 << 5;
public const SUNDAY = 1 << 6;
protected static $labels = [
Days::MONDAY => 'system.days.mon',

View File

@ -5,9 +5,9 @@ namespace App\Models\Enums;
class FlightType extends EnumBase {
const PASSENGER = 0;
const CARGO = 1;
const CHARTER = 2;
public const PASSENGER = 0;
public const CARGO = 1;
public const CHARTER = 2;
protected static $labels = [
FlightType::PASSENGER => 'Passenger',

View File

@ -4,9 +4,9 @@ namespace App\Models\Enums;
class FuelType extends EnumBase {
const LOW_LEAD = 0;
const JET_A = 1;
const MOGAS = 2;
public const LOW_LEAD = 0;
public const JET_A = 1;
public const MOGAS = 2;
protected static $labels = [
FuelType::LOW_LEAD => '100LL',

View File

@ -8,8 +8,8 @@ namespace App\Models\Enums;
*/
class GenericState extends EnumBase
{
const INACTIVE = 0;
const ACTIVE = 1;
public const INACTIVE = 0;
public const ACTIVE = 1;
public static $labels = [
GenericState::INACTIVE => 'Inactive',

View File

@ -13,19 +13,19 @@ namespace App\Models\Enums;
*/
class NavaidType extends EnumBase
{
const VOR = 1 << 0;
const VOR_DME = 1 << 1;
const LOC = 1 << 4;
const LOC_DME = 1 << 5;
const NDB = 1 << 6;
const TACAN = 1 << 7;
const UNKNOWN = 1 << 8;
const INNER_MARKER = 1 << 9;
const OUTER_MARKER = 1 << 10;
const FIX = 1 << 11;
const ANY_VOR = NavaidType::VOR | NavaidType::VOR_DME;
const ANY_LOC = NavaidType::LOC | NavaidType::LOC_DME;
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

View File

@ -11,12 +11,11 @@ namespace App\Models\Enums;
class PirepSource extends EnumBase
{
const MANUAL = 0;
const ACARS = 1;
public const MANUAL = 0;
public const ACARS = 1;
protected static $labels = [
PirepSource::MANUAL => 'Manual',
PirepSource::ACARS => 'ACARS',
];
}

View File

@ -5,12 +5,12 @@ namespace App\Models\Enums;
class PirepState extends EnumBase {
const REJECTED = -1;
const IN_PROGRESS = 0;
const PENDING = 1;
const ACCEPTED = 2;
const CANCELLED = 3;
const DELETED = 4;
public const REJECTED = -1;
public const IN_PROGRESS = 0;
public const PENDING = 1;
public const ACCEPTED = 2;
public const CANCELLED = 3;
public const DELETED = 4;
protected static $labels = [
PirepState::REJECTED => 'system.pireps.state.rejected',

View File

@ -13,10 +13,10 @@ namespace App\Models\Enums;
*/
class PirepStatus extends EnumBase
{
const PREFILE = 0;
const SCHEDULED = 0;
const ENROUTE = 1;
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',

View File

@ -7,11 +7,11 @@ namespace App\Models\Enums;
class UserState extends EnumBase
{
const PENDING = 0;
const ACTIVE = 1;
const REJECTED = 2;
const ON_LEAVE = 3;
const SUSPENDED = 4;
public const PENDING = 0;
public const ACTIVE = 1;
public const REJECTED = 2;
public const ON_LEAVE = 3;
public const SUSPENDED = 4;
protected static $labels = [
UserState::PENDING => 'Pending',