-
Notifications
You must be signed in to change notification settings - Fork 70
Expand file tree
/
Copy path.php-cs-fixer.php
More file actions
37 lines (34 loc) · 1.03 KB
/
.php-cs-fixer.php
File metadata and controls
37 lines (34 loc) · 1.03 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
<?php
use PhpCsFixerCustomFixers\Fixer\MultilinePromotedPropertiesFixer;
$finder = (new PhpCsFixer\Finder())
->name('*.php')
->in([
__DIR__ . '/app',
__DIR__ . '/db',
__DIR__ . '/htdocs/pages',
__DIR__ . '/sources',
__DIR__ . '/tests',
])
;
return (new PhpCsFixer\Config())
->registerCustomFixers(new PhpCsFixerCustomFixers\Fixers())
->setRiskyAllowed(true)
->setRules([
'@PER-CS3x0' => true,
'@PHP7x4Migration:risky' => true,
'no_alias_functions' => true,
'native_function_casing' => true,
'phpdoc_no_access' => true,
'self_accessor' => true,
'no_unused_imports' => true,
'method_argument_space' => false,
'statement_indentation' => false,
'multiline_promoted_properties' => [
'keep_blank_lines' => true,
'minimum_number_of_parameters' => 2,
],
'type_declaration_spaces' => true,
])
->setFinder($finder)
->setCacheFile(__DIR__.'/var/.php-cs-fixer.cache')
;