Skip to content

Commit 116ea3f

Browse files
committed
php-cs-fixer
1 parent 824110e commit 116ea3f

File tree

90 files changed

+251
-215
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+251
-215
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ mixwatch.log
3838
laravel-echo-server.lock
3939
ziggy.js
4040
.php_cs.cache
41+
.php-cs-fixer.cache
4142
dump.html
4243
report.html
4344
/resources/sass/_variables_*.scss

.php-cs-fixer.dist.php

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
'extra',
4343
'throw',
4444
'use',
45-
'use_trait',
4645
],
4746
],
4847
'no_blank_lines_after_class_opening' => true,
@@ -127,15 +126,15 @@
127126
],
128127
'class_attributes_separation' => [
129128
'elements' => [
130-
'const' => 'one',
129+
'const' => 'only_if_meta',
131130
'method' => 'one',
132131
'property' => 'one',
133132
],
134133
],
135134
'class_definition' => [
136135
'multi_line_extends_each_single_line' => true,
137-
'single_item_single_line' => true,
138-
'single_line' => true,
136+
'single_item_single_line' => false,
137+
'single_line' => false,
139138
],
140139
'ordered_imports' => [
141140
'sort_algorithm' => 'alpha',
@@ -156,12 +155,12 @@
156155

157156
$finder = Finder::create()
158157
->in([
159-
__DIR__.'/app',
160-
__DIR__.'/config',
161-
__DIR__.'/database',
162-
__DIR__.'/resources',
163-
__DIR__.'/routes',
164-
__DIR__.'/tests',
158+
__DIR__ . '/app',
159+
__DIR__ . '/config',
160+
__DIR__ . '/database',
161+
__DIR__ . '/resources',
162+
__DIR__ . '/routes',
163+
__DIR__ . '/tests',
165164
])
166165
->name('*.php')
167166
->notName('*.blade.php')

app/HMS/Auth/FileBasedPasswordStore.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
class FileBasedPasswordStore implements PasswordStore
99
{
1010
protected $usersFile;
11+
1112
protected $users;
1213

1314
/**

app/HMS/Entities/Banking/Account.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class Account
99
/**
1010
* Maximum length for a Payment reference.
1111
*/
12-
const MAX_REFERENCE_LENGHT = 16;
12+
public const MAX_REFERENCE_LENGHT = 16;
1313

1414
/**
1515
* @var int

app/HMS/Entities/Banking/BankType.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,22 @@ abstract class BankType
77
/*
88
* Fully Automatic bank where new transactions are uploaded via the api endpoint
99
*/
10-
const AUTOMATIC = 'AUTOMATIC';
10+
public const AUTOMATIC = 'AUTOMATIC';
1111

1212
/*
1313
* Transactions are manually entered (via web interface) record of a payment or purchase or via the api.
1414
*/
15-
const MANUAL = 'MANUAL';
15+
public const MANUAL = 'MANUAL';
1616

1717
/*
1818
* Special case MANUAL to represent petty cash account.
1919
*/
20-
const CASH = 'CASH';
20+
public const CASH = 'CASH';
2121

2222
/**
2323
* String representation of types for display.
2424
*/
25-
const TYPE_STRINGS = [
25+
public const TYPE_STRINGS = [
2626
self::AUTOMATIC => 'Automatic',
2727
self::MANUAL => 'Manual',
2828
self::CASH => 'Cash',

app/HMS/Entities/Banking/MembershipStatusNotification.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ class MembershipStatusNotification
1010
/**
1111
* The Notification was cleared due to a payment before membership was revoked.
1212
*/
13-
const PAYMENT = 'PAYMENT';
13+
public const PAYMENT = 'PAYMENT';
1414

1515
/**
1616
* The Notification was cleared when the membership was revoked.
1717
*/
18-
const REVOKED = 'REVOKED';
18+
public const REVOKED = 'REVOKED';
1919

2020
/**
2121
* The Notification was cleared manually, likely due to audit issues.
2222
*/
23-
const MANUAL = 'MANUAL';
23+
public const MANUAL = 'MANUAL';
2424

2525
/**
2626
* @var int

app/HMS/Entities/Banking/Stripe/ChargeType.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ abstract class ChargeType
77
/*
88
* Payment for Snackspace.
99
*/
10-
const SNACKSPACE = 'SNACKSPACE';
10+
public const SNACKSPACE = 'SNACKSPACE';
1111

1212
/*
1313
* Donation to the space.
1414
*/
15-
const DONATION = 'DONATION';
15+
public const DONATION = 'DONATION';
1616

1717
/**
1818
* String representation of types for display.
1919
*/
20-
const TYPE_STRINGS = [
20+
public const TYPE_STRINGS = [
2121
self::SNACKSPACE => 'Snackspace',
2222
self::DONATION => 'Donation',
2323
];

app/HMS/Entities/ContentBlockType.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ abstract class ContentBlockType
77
/*
88
* Blade view
99
*/
10-
const PAGE = 'PAGE';
10+
public const PAGE = 'PAGE';
1111

1212
/*
1313
* Markdown view
1414
*/
15-
const EMAIL = 'EMAIL';
15+
public const EMAIL = 'EMAIL';
1616

1717
/**
1818
* String representation of types for display.
1919
*/
20-
const TYPE_STRINGS = [
20+
public const TYPE_STRINGS = [
2121
self::PAGE => 'Page',
2222
self::EMAIL => 'Email',
2323
];

app/HMS/Entities/Gatekeeper/AccessLogResult.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ abstract class AccessLogResult
77
/**
88
* Access was denied.
99
*/
10-
const ACCESS_DENIED = 10;
10+
public const ACCESS_DENIED = 10;
1111

1212
/**
1313
* Access was granted.
1414
*/
15-
const ACCESS_GRANTED = 20;
15+
public const ACCESS_GRANTED = 20;
1616

1717
/**
1818
* String representation of states for display.
1919
*/
20-
const RESULT_STRINGS =
20+
public const RESULT_STRINGS =
2121
[
2222
self::ACCESS_DENIED => 'Denied',
2323
self::ACCESS_GRANTED => 'Granted',

app/HMS/Entities/Gatekeeper/BookableAreaBookingColor.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@
44

55
abstract class BookableAreaBookingColor
66
{
7-
const PRIMARY = 'primary';
8-
const GREEN = 'green';
9-
const RED = 'red';
10-
const INDIGO = 'indigo';
11-
const YELLOW = 'yellow';
12-
const PINK = 'pink';
13-
const ORANGE = 'orange';
14-
const CYAN = 'cyan';
7+
public const PRIMARY = 'primary';
8+
public const GREEN = 'green';
9+
public const RED = 'red';
10+
public const INDIGO = 'indigo';
11+
public const YELLOW = 'yellow';
12+
public const PINK = 'pink';
13+
public const ORANGE = 'orange';
14+
public const CYAN = 'cyan';
1515

1616
/**
1717
* String representation of states for display.
1818
*/
19-
const COLOR_STRINGS = [
19+
public const COLOR_STRINGS = [
2020
self::PRIMARY => 'Hackspace Green',
2121
self::GREEN => 'Green',
2222
self::RED => 'Red',

app/HMS/Entities/Gatekeeper/BuildingAccessState.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,27 @@ abstract class BuildingAccessState
77
/**
88
* The building is fully open to all members, they can come and go 24/7.
99
*/
10-
const FULL_OPEN = 'FULL_OPEN';
10+
public const FULL_OPEN = 'FULL_OPEN';
1111

1212
/**
1313
* Members need to self book access to enter the building.
1414
*/
15-
const SELF_BOOK = 'SELF_BOOK';
15+
public const SELF_BOOK = 'SELF_BOOK';
1616

1717
/**
1818
* Members can request an access slot booking, which needs approval before they can enter the building.
1919
*/
20-
const REQUESTED_BOOK = 'REQUESTED_BOOK';
20+
public const REQUESTED_BOOK = 'REQUESTED_BOOK';
2121

2222
/**
2323
* The building is closed to all but Trustees. They may grant access to others.
2424
*/
25-
const CLOSED = 'CLOSED';
25+
public const CLOSED = 'CLOSED';
2626

2727
/**
2828
* String representation of states for display.
2929
*/
30-
const STATE_STRINGS = [
30+
public const STATE_STRINGS = [
3131
self::FULL_OPEN => 'Fully open',
3232
self::SELF_BOOK => 'Self booked access',
3333
self::REQUESTED_BOOK => 'Requested access',

app/HMS/Entities/Gatekeeper/Pin.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,27 @@ class Pin
1111
* @var int
1212
*/
1313
protected $id;
14+
1415
/**
1516
* @var string
1617
*/
1718
protected $pin;
19+
1820
/**
1921
* @var Carbon
2022
*/
2123
protected $dateAdded;
24+
2225
/**
2326
* @var Carbon
2427
*/
2528
protected $expiry;
29+
2630
/**
2731
* @var int
2832
*/
2933
protected $state;
34+
3035
/**
3136
* @var User
3237
*/

app/HMS/Entities/Gatekeeper/PinState.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,27 @@ abstract class PinState
77
/**
88
* This pin can be used for entry (up until the expiry date), cannot be used to register a card.
99
*/
10-
const ACTIVE = 10;
10+
public const ACTIVE = 10;
1111

1212
/**
1313
* Pin has expired and can no longer be used for entry.
1414
*/
15-
const EXPIRED = 20;
15+
public const EXPIRED = 20;
1616

1717
/**
1818
* This pin cannot be used for entry, and has likely been used to activate an RFID card.
1919
*/
20-
const CANCELLED = 30;
20+
public const CANCELLED = 30;
2121

2222
/**
2323
* This pin may be used to enrol an RFID card.
2424
*/
25-
const ENROLL = 40;
25+
public const ENROLL = 40;
2626

2727
/**
2828
* String representation of states for display.
2929
*/
30-
const STATE_STRINGS =
30+
public const STATE_STRINGS =
3131
[
3232
self::ACTIVE => 'Active',
3333
self::EXPIRED => 'Expired',

app/HMS/Entities/Gatekeeper/RfidTagState.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,22 @@ abstract class RfidTagState
77
/**
88
* This RfidTag can be used for entry (up until the expiry date), cannot be used to register a card.
99
*/
10-
const ACTIVE = 10;
10+
public const ACTIVE = 10;
1111

1212
/**
1313
* RfidTag has been destroyed and can no longer be used for entry.
1414
*/
15-
const EXPIRED = 20;
15+
public const EXPIRED = 20;
1616

1717
/**
1818
* RfidTag has been lost and can no longer be used for entry.
1919
*/
20-
const LOST = 30;
20+
public const LOST = 30;
2121

2222
/**
2323
* String representation of states for display.
2424
*/
25-
const STATE_STRINGS =
25+
public const STATE_STRINGS =
2626
[
2727
self::ACTIVE => 'Active',
2828
self::EXPIRED => 'Destroyed',

app/HMS/Entities/Gatekeeper/Zone.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
class Zone
88
{
9-
const OFF_SITE = 'Off-site';
9+
public const OFF_SITE = 'Off-site';
1010

1111
/**
1212
* @var int

app/HMS/Entities/Instrumentation/EventType.php

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,21 @@
44

55
abstract class EventType
66
{
7-
const LAST_OUT = 'LAST_OUT';
8-
9-
const FIRST_IN = 'FIRST_IN';
10-
11-
const DOOR_OPENED = 'DOOR_OPENED';
12-
13-
const DOOR_CLOSED = 'DOOR_CLOSED';
14-
15-
const DOOR_TIMEOUT = 'DOOR_TIMEOUT';
16-
17-
const DOORBELL = 'DOORBELL';
18-
19-
const PROCESS_RESTART = 'PROCESS_RESTART';
20-
21-
const WARN = 'WARN';
22-
23-
const DOOR_LOCKED = 'DOOR_LOCKED';
24-
25-
const UNKNOWN = 'UNKNOWN';
7+
public const LAST_OUT = 'LAST_OUT';
8+
public const FIRST_IN = 'FIRST_IN';
9+
public const DOOR_OPENED = 'DOOR_OPENED';
10+
public const DOOR_CLOSED = 'DOOR_CLOSED';
11+
public const DOOR_TIMEOUT = 'DOOR_TIMEOUT';
12+
public const DOORBELL = 'DOORBELL';
13+
public const PROCESS_RESTART = 'PROCESS_RESTART';
14+
public const WARN = 'WARN';
15+
public const DOOR_LOCKED = 'DOOR_LOCKED';
16+
public const UNKNOWN = 'UNKNOWN';
2617

2718
/**
2819
* String representation of types for display.
2920
*/
30-
const TYPE_STRINGS = [
21+
public const TYPE_STRINGS = [
3122
self::LAST_OUT => 'Last Out',
3223
self::FIRST_IN => 'First In',
3324
self::DOOR_OPENED => 'Door Opened',

0 commit comments

Comments
 (0)