-
Notifications
You must be signed in to change notification settings - Fork 9
/
.php-cs-fixer.dist.php
47 lines (42 loc) · 1.21 KB
/
.php-cs-fixer.dist.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
<?php
/*
|--------------------------------------------------------------------------
| Configure PHP CS Fixer
|--------------------------------------------------------------------------
|
| Set locations to fix files in
*/
$finder = PhpCsFixer\Finder::create()->in([
__DIR__.'/src',
__DIR__.'/tests',
]);
/*
|--------------------------------------------------------------------------
| Configure PHP CS Fixer
|--------------------------------------------------------------------------
|
| Define rules
*/
$rules = [
'@Symfony' => true,
'concat_space' => ['spacing' => 'one'],
'new_with_braces' => true,
'no_superfluous_phpdoc_tags' => false,
'not_operator_with_successor_space' => true,
'ordered_imports' => ['sort_algorithm' => 'alpha'],
'php_unit_method_casing' => ['case' => 'snake_case'],
'phpdoc_separation' => false,
'phpdoc_align' => ['align' => 'left'],
];
/*
|--------------------------------------------------------------------------
| Configure PHP CS Fixer
|--------------------------------------------------------------------------
|
| Complete config
*/
$config = new PhpCsFixer\Config();
return $config
->setFinder($finder)
->setRiskyAllowed(true)
->setRules($rules);