-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.php-cs-fixer.dist.php
30 lines (28 loc) · 1.06 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
<?php
$finder = (new PhpCsFixer\Finder())
->in([
__DIR__.'/src',
__DIR__.'/tests',
__DIR__.'/examples',
]);
return (new PhpCsFixer\Config())
->setRiskyAllowed(true)
->setRules([
'@PSR12' => true,
'@PSR2' => true,
'function_declaration' => [
'closure_function_spacing' => 'none',
'closure_fn_spacing' => 'none',
],
'ordered_imports' => ['imports_order' => ['class', 'function', 'const'], 'sort_algorithm' => 'alpha'],
'no_unused_imports' => true,
'blank_line_between_import_groups' => false,
'no_extra_blank_lines' => ['tokens' => ['use']],
'native_function_casing' => true,
'native_constant_invocation' => ['strict' => false],
'native_function_invocation' => ['include' => ['@all'], 'scope' => 'namespaced', 'strict' => true],
'ordered_class_elements' => ['order' => ['use_trait', 'public', 'protected', 'private']],
'single_line_empty_body' => true,
])
->setLineEnding(PHP_EOL)
->setFinder($finder);