-
Notifications
You must be signed in to change notification settings - Fork 32
/
.php-cs-fixer.dist.php
44 lines (41 loc) · 1.37 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
<?php
/**
* @link https://github.com/FriendsOfPHP/PHP-CS-Fixer
*/
$finder = PhpCsFixer\Finder::create()
->exclude('vendor')
->in(__DIR__)
->name('*.php')
;
return (new PhpCsFixer\Config())
->setRiskyAllowed(true)
->setUsingCache(false)
->setLineEnding("\n")
->setRules([
'@PSR1' => true,
'@PSR2' => true,
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => true,
'blank_line_after_opening_tag' => true,
'cast_spaces' => ['space' => 'none'],
'concat_space' => ['spacing' => 'one'],
'include' => true,
'yoda_style' => false,
'list_syntax' => ['syntax' => 'short'],
'method_argument_space' => ['on_multiline' => 'ignore'],
'no_binary_string' => true,
'no_extra_blank_lines' => true,
'no_singleline_whitespace_before_semicolons' => true,
'no_superfluous_elseif' => true,
'no_unused_imports' => true,
'no_whitespace_in_blank_line' => true,
'ordered_imports' => ['imports_order' => ['class', 'function', 'const']],
'phpdoc_order' => true,
'return_type_declaration' => true,
'semicolon_after_instruction' => true,
'single_blank_line_before_namespace' => true,
'ternary_operator_spaces' => true,
'whitespace_after_comma_in_array' => true,
])
->setFinder($finder)
;