-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.php-cs-fixer.php
More file actions
72 lines (69 loc) · 2.21 KB
/
.php-cs-fixer.php
File metadata and controls
72 lines (69 loc) · 2.21 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?php
use PhpCsFixer\Config;
$finder = PhpCsFixer\Finder::create()
->in(__DIR__ . '/public')
->in(__DIR__ . '/src');
return (new Config())
->setRules(
[
'@PSR12' => true,
'@PHP80Migration' => true,
'@PHP80Migration:risky' => true,
'@PHP81Migration' => true,
'@PHP82Migration' => true,
'@PHP82Migration:risky' => true,
'@PHP83Migration' => true,
'@PHP84Migration' => true,
'ordered_class_elements' => [
'order' => [
'use_trait',
'constant_public',
'constant_protected',
'constant_private',
'property_public',
'property_protected',
'property_private',
'construct',
'destruct',
'magic',
'phpunit',
'method_public',
'method_protected',
'method_private',
],
'sort_algorithm' => 'none',
],
'array_syntax' => [
'syntax' => 'short',
],
'cast_spaces' => true,
'concat_space' => [
'spacing' => 'one',
],
'no_unused_imports' => true,
'phpdoc_align' => true,
'phpdoc_single_line_var_spacing' => true,
'return_type_declaration' => [
'space_before' => 'none',
],
'self_accessor' => true,
'single_quote' => true,
'short_scalar_cast' => true,
'standardize_not_equals' => true,
'trailing_comma_in_multiline' => [
'after_heredoc' => false,
'elements' => [
'arguments',
'arrays',
'match',
'parameters',
],
],
'trim_array_spaces' => true,
'whitespace_after_comma_in_array' => true,
'declare_strict_types' => true,
],
)
->setFinder($finder)
->setUsingCache(true)
->setRiskyAllowed(true);