-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphp-cs-fixer.php
More file actions
38 lines (35 loc) · 1.15 KB
/
Copy pathphp-cs-fixer.php
File metadata and controls
38 lines (35 loc) · 1.15 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
<?php
declare(strict_types=1);
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$finder = (new Finder())
->in(__DIR__)
->exclude([
'autogenerated_content',
'tests/fixtures',
])
;
return (new Config())
->setRules([
'@PhpCsFixer' => true,
'@PhpCsFixer:risky' => true,
'align_multiline_comment' => ['comment_type' => 'all_multiline'],
'phpdoc_align' => ['align' => 'left'],
'concat_space' => ['spacing' => 'one'],
'return_type_declaration' => ['space_before' => 'none'],
'no_unused_imports' => true,
'single_import_per_statement' => ['group_to_single_imports' => true],
'ordered_imports' => ['sort_algorithm' => 'alpha'],
'no_mixed_echo_print' => ['use' => 'echo'],
'array_syntax' => ['syntax' => 'short'],
'no_multiline_whitespace_around_double_arrow' => true,
'trim_array_spaces' => true,
'octal_notation' => true,
'declare_strict_types' => true,
'native_constant_invocation' => false,
'native_function_invocation' => false,
])
->setFinder($finder)
->setUsingCache(false)
->setRiskyAllowed(true)
;