-
Notifications
You must be signed in to change notification settings - Fork 10
/
.php-cs-fixer.dist.php
48 lines (45 loc) · 1.6 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
48
<?php
$finder = PhpCsFixer\Finder::create()
->exclude('vendor')
->exclude('example')
->in(__DIR__)
->name('*.php')
->ignoreDotFiles(true)
->ignoreVCS(true);
$fixers = [
'@Symfony' => true,
'declare_strict_types' => true,
'align_multiline_comment' => true,
'array_indentation' => true,
'array_syntax' => ['syntax' => 'short'],
'combine_consecutive_issets' => true,
'combine_consecutive_unsets' => true,
'compact_nullable_typehint' => true,
'concat_space' => ['spacing' => 'one'],
'explicit_indirect_variable' => true,
'explicit_string_variable' => true,
'fully_qualified_strict_types' => true,
'linebreak_after_opening_tag' => true,
'list_syntax' => ['syntax' => 'short'],
'method_chaining_indentation' => true,
'multiline_comment_opening_closing' => true,
'multiline_whitespace_before_semicolons' => ['strategy' => 'no_multi_line'],
'native_function_invocation' => ['include' => ['@all'], 'exclude' => ['usleep']],
'no_superfluous_phpdoc_tags' => false,
'not_operator_with_successor_space' => false,
'ordered_imports' => ['sort_algorithm' => 'alpha'],
'phpdoc_no_empty_return' => false,
'phpdoc_order' => true,
'phpdoc_single_line_var_spacing' => true,
'simple_to_complex_string_variable' => true,
'single_trait_insert_per_statement' => false,
'ternary_to_null_coalescing' => true,
'yoda_style' => false,
];
return (new PhpCsFixer\Config())
->setRules($fixers)
->setFinder($finder)
->setRiskyAllowed(true)
->setUsingCache(true)
->setIndent(' ')
->setLineEnding("\n");