Skip to content

Commit

Permalink
php-cs-fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
dpslwk committed Nov 5, 2021
1 parent 824110e commit eea000a
Show file tree
Hide file tree
Showing 85 changed files with 225 additions and 197 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ mixwatch.log
laravel-echo-server.lock
ziggy.js
.php_cs.cache
.php-cs-fixer.cache
dump.html
report.html
/resources/sass/_variables_*.scss
19 changes: 9 additions & 10 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
'extra',
'throw',
'use',
'use_trait',
],
],
'no_blank_lines_after_class_opening' => true,
Expand Down Expand Up @@ -127,15 +126,15 @@
],
'class_attributes_separation' => [
'elements' => [
'const' => 'one',
'const' => 'only_if_meta',
'method' => 'one',
'property' => 'one',
],
],
'class_definition' => [
'multi_line_extends_each_single_line' => true,
'single_item_single_line' => true,
'single_line' => true,
'single_item_single_line' => false,
'single_line' => false,
],
'ordered_imports' => [
'sort_algorithm' => 'alpha',
Expand All @@ -156,12 +155,12 @@

$finder = Finder::create()
->in([
__DIR__.'/app',
__DIR__.'/config',
__DIR__.'/database',
__DIR__.'/resources',
__DIR__.'/routes',
__DIR__.'/tests',
__DIR__ . '/app',
__DIR__ . '/config',
// __DIR__ . '/database',
// __DIR__ . '/resources',
__DIR__ . '/routes',
// __DIR__ . '/tests',
])
->name('*.php')
->notName('*.blade.php')
Expand Down
1 change: 1 addition & 0 deletions app/HMS/Auth/FileBasedPasswordStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
class FileBasedPasswordStore implements PasswordStore
{
protected $usersFile;

protected $users;

/**
Expand Down
2 changes: 1 addition & 1 deletion app/HMS/Entities/Banking/Account.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Account
/**
* Maximum length for a Payment reference.
*/
const MAX_REFERENCE_LENGHT = 16;
public const MAX_REFERENCE_LENGHT = 16;

/**
* @var int
Expand Down
8 changes: 4 additions & 4 deletions app/HMS/Entities/Banking/BankType.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@ abstract class BankType
/*
* Fully Automatic bank where new transactions are uploaded via the api endpoint
*/
const AUTOMATIC = 'AUTOMATIC';
public const AUTOMATIC = 'AUTOMATIC';

/*
* Transactions are manually entered (via web interface) record of a payment or purchase or via the api.
*/
const MANUAL = 'MANUAL';
public const MANUAL = 'MANUAL';

/*
* Special case MANUAL to represent petty cash account.
*/
const CASH = 'CASH';
public const CASH = 'CASH';

/**
* String representation of types for display.
*/
const TYPE_STRINGS = [
public const TYPE_STRINGS = [
self::AUTOMATIC => 'Automatic',
self::MANUAL => 'Manual',
self::CASH => 'Cash',
Expand Down
6 changes: 3 additions & 3 deletions app/HMS/Entities/Banking/MembershipStatusNotification.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ class MembershipStatusNotification
/**
* The Notification was cleared due to a payment before membership was revoked.
*/
const PAYMENT = 'PAYMENT';
public const PAYMENT = 'PAYMENT';

/**
* The Notification was cleared when the membership was revoked.
*/
const REVOKED = 'REVOKED';
public const REVOKED = 'REVOKED';

/**
* The Notification was cleared manually, likely due to audit issues.
*/
const MANUAL = 'MANUAL';
public const MANUAL = 'MANUAL';

/**
* @var int
Expand Down
6 changes: 3 additions & 3 deletions app/HMS/Entities/Banking/Stripe/ChargeType.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ abstract class ChargeType
/*
* Payment for Snackspace.
*/
const SNACKSPACE = 'SNACKSPACE';
public const SNACKSPACE = 'SNACKSPACE';

/*
* Donation to the space.
*/
const DONATION = 'DONATION';
public const DONATION = 'DONATION';

/**
* String representation of types for display.
*/
const TYPE_STRINGS = [
public const TYPE_STRINGS = [
self::SNACKSPACE => 'Snackspace',
self::DONATION => 'Donation',
];
Expand Down
6 changes: 3 additions & 3 deletions app/HMS/Entities/ContentBlockType.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ abstract class ContentBlockType
/*
* Blade view
*/
const PAGE = 'PAGE';
public const PAGE = 'PAGE';

/*
* Markdown view
*/
const EMAIL = 'EMAIL';
public const EMAIL = 'EMAIL';

/**
* String representation of types for display.
*/
const TYPE_STRINGS = [
public const TYPE_STRINGS = [
self::PAGE => 'Page',
self::EMAIL => 'Email',
];
Expand Down
6 changes: 3 additions & 3 deletions app/HMS/Entities/Gatekeeper/AccessLogResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ abstract class AccessLogResult
/**
* Access was denied.
*/
const ACCESS_DENIED = 10;
public const ACCESS_DENIED = 10;

/**
* Access was granted.
*/
const ACCESS_GRANTED = 20;
public const ACCESS_GRANTED = 20;

/**
* String representation of states for display.
*/
const RESULT_STRINGS =
public const RESULT_STRINGS =
[
self::ACCESS_DENIED => 'Denied',
self::ACCESS_GRANTED => 'Granted',
Expand Down
18 changes: 9 additions & 9 deletions app/HMS/Entities/Gatekeeper/BookableAreaBookingColor.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@

abstract class BookableAreaBookingColor
{
const PRIMARY = 'primary';
const GREEN = 'green';
const RED = 'red';
const INDIGO = 'indigo';
const YELLOW = 'yellow';
const PINK = 'pink';
const ORANGE = 'orange';
const CYAN = 'cyan';
public const PRIMARY = 'primary';
public const GREEN = 'green';
public const RED = 'red';
public const INDIGO = 'indigo';
public const YELLOW = 'yellow';
public const PINK = 'pink';
public const ORANGE = 'orange';
public const CYAN = 'cyan';

/**
* String representation of states for display.
*/
const COLOR_STRINGS = [
public const COLOR_STRINGS = [
self::PRIMARY => 'Hackspace Green',
self::GREEN => 'Green',
self::RED => 'Red',
Expand Down
10 changes: 5 additions & 5 deletions app/HMS/Entities/Gatekeeper/BuildingAccessState.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,27 @@ abstract class BuildingAccessState
/**
* The building is fully open to all members, they can come and go 24/7.
*/
const FULL_OPEN = 'FULL_OPEN';
public const FULL_OPEN = 'FULL_OPEN';

/**
* Members need to self book access to enter the building.
*/
const SELF_BOOK = 'SELF_BOOK';
public const SELF_BOOK = 'SELF_BOOK';

/**
* Members can request an access slot booking, which needs approval before they can enter the building.
*/
const REQUESTED_BOOK = 'REQUESTED_BOOK';
public const REQUESTED_BOOK = 'REQUESTED_BOOK';

/**
* The building is closed to all but Trustees. They may grant access to others.
*/
const CLOSED = 'CLOSED';
public const CLOSED = 'CLOSED';

/**
* String representation of states for display.
*/
const STATE_STRINGS = [
public const STATE_STRINGS = [
self::FULL_OPEN => 'Fully open',
self::SELF_BOOK => 'Self booked access',
self::REQUESTED_BOOK => 'Requested access',
Expand Down
5 changes: 5 additions & 0 deletions app/HMS/Entities/Gatekeeper/Pin.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,27 @@ class Pin
* @var int
*/
protected $id;

/**
* @var string
*/
protected $pin;

/**
* @var Carbon
*/
protected $dateAdded;

/**
* @var Carbon
*/
protected $expiry;

/**
* @var int
*/
protected $state;

/**
* @var User
*/
Expand Down
10 changes: 5 additions & 5 deletions app/HMS/Entities/Gatekeeper/PinState.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,27 @@ abstract class PinState
/**
* This pin can be used for entry (up until the expiry date), cannot be used to register a card.
*/
const ACTIVE = 10;
public const ACTIVE = 10;

/**
* Pin has expired and can no longer be used for entry.
*/
const EXPIRED = 20;
public const EXPIRED = 20;

/**
* This pin cannot be used for entry, and has likely been used to activate an RFID card.
*/
const CANCELLED = 30;
public const CANCELLED = 30;

/**
* This pin may be used to enrol an RFID card.
*/
const ENROLL = 40;
public const ENROLL = 40;

/**
* String representation of states for display.
*/
const STATE_STRINGS =
public const STATE_STRINGS =
[
self::ACTIVE => 'Active',
self::EXPIRED => 'Expired',
Expand Down
8 changes: 4 additions & 4 deletions app/HMS/Entities/Gatekeeper/RfidTagState.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@ abstract class RfidTagState
/**
* This RfidTag can be used for entry (up until the expiry date), cannot be used to register a card.
*/
const ACTIVE = 10;
public const ACTIVE = 10;

/**
* RfidTag has been destroyed and can no longer be used for entry.
*/
const EXPIRED = 20;
public const EXPIRED = 20;

/**
* RfidTag has been lost and can no longer be used for entry.
*/
const LOST = 30;
public const LOST = 30;

/**
* String representation of states for display.
*/
const STATE_STRINGS =
public const STATE_STRINGS =
[
self::ACTIVE => 'Active',
self::EXPIRED => 'Destroyed',
Expand Down
2 changes: 1 addition & 1 deletion app/HMS/Entities/Gatekeeper/Zone.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

class Zone
{
const OFF_SITE = 'Off-site';
public const OFF_SITE = 'Off-site';

/**
* @var int
Expand Down
31 changes: 11 additions & 20 deletions app/HMS/Entities/Instrumentation/EventType.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,21 @@

abstract class EventType
{
const LAST_OUT = 'LAST_OUT';

const FIRST_IN = 'FIRST_IN';

const DOOR_OPENED = 'DOOR_OPENED';

const DOOR_CLOSED = 'DOOR_CLOSED';

const DOOR_TIMEOUT = 'DOOR_TIMEOUT';

const DOORBELL = 'DOORBELL';

const PROCESS_RESTART = 'PROCESS_RESTART';

const WARN = 'WARN';

const DOOR_LOCKED = 'DOOR_LOCKED';

const UNKNOWN = 'UNKNOWN';
public const LAST_OUT = 'LAST_OUT';
public const FIRST_IN = 'FIRST_IN';
public const DOOR_OPENED = 'DOOR_OPENED';
public const DOOR_CLOSED = 'DOOR_CLOSED';
public const DOOR_TIMEOUT = 'DOOR_TIMEOUT';
public const DOORBELL = 'DOORBELL';
public const PROCESS_RESTART = 'PROCESS_RESTART';
public const WARN = 'WARN';
public const DOOR_LOCKED = 'DOOR_LOCKED';
public const UNKNOWN = 'UNKNOWN';

/**
* String representation of types for display.
*/
const TYPE_STRINGS = [
public const TYPE_STRINGS = [
self::LAST_OUT => 'Last Out',
self::FIRST_IN => 'First In',
self::DOOR_OPENED => 'Door Opened',
Expand Down
Loading

0 comments on commit eea000a

Please sign in to comment.