-
Notifications
You must be signed in to change notification settings - Fork 67
/
Copy path.php-cs-fixer.php
35 lines (33 loc) · 983 Bytes
/
.php-cs-fixer.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
<?php
$finder = (new PhpCsFixer\Finder())
->name('*.php')
->in([
__DIR__ . '/app',
__DIR__ . '/db',
__DIR__ . '/htdocs',
__DIR__ . '/sources',
__DIR__ . '/tests',
])
;
return (new PhpCsFixer\Config())
->setRiskyAllowed(true)
->setRules([
'@PSR2' => true,
'@PHP74Migration:risky' => true,
'blank_line_after_opening_tag' => true,
'concat_space' => ['spacing' => 'one'],
'no_alias_functions' => true,
'native_function_casing' => true,
'no_blank_lines_after_class_opening' => true,
'ordered_imports' => true,
'phpdoc_no_access' => true,
'no_leading_import_slash' => true,
'self_accessor' => true,
'array_syntax' => ['syntax' => 'short'],
'cast_spaces' => true,
'no_unused_imports' => true,
'no_whitespace_in_blank_line' => true,
'method_argument_space' => false,
])
->setFinder($finder)
;