-
Notifications
You must be signed in to change notification settings - Fork 0
/
php-cs-fixer-strict-rules.php
52 lines (49 loc) · 1.34 KB
/
php-cs-fixer-strict-rules.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
declare(strict_types=1);
$basicRules = include __DIR__ . '/php-cs-fixer-rules.php';
return array_merge($basicRules, [
'nullable_type_declaration' => [
'syntax' => 'union',
],
'ordered_class_elements' => [
'order' => [
'use_trait',
'case',
'constant_public',
'constant_protected',
'constant_private',
'property',
'property_static',
'construct',
'destruct',
'method_public_static',
'method_public_abstract_static',
'method_protected_static',
'method_protected_abstract_static',
'method_private_static',
'method_private_abstract_static',
'magic',
'method_public',
'method_public_abstract',
'phpunit',
'method_protected_abstract',
'method_protected',
'method_private',
'method_private_abstract',
],
],
'ordered_types' => [
'sort_algorithm' => 'none',
'null_adjustment' => 'always_last',
],
'self_accessor' => true,
'static_lambda' => true,
'trailing_comma_in_multiline' => [
'elements' => [
'arguments',
'arrays',
'match',
'parameters',
],
],
]);