-
Notifications
You must be signed in to change notification settings - Fork 0
/
.php_cs.dist
35 lines (32 loc) · 1.52 KB
/
.php_cs.dist
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
<?php
$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
->exclude('vendor')
->name('*.php')
->name('.php_cs.dist');
$config = new PhpCsFixer\Config();
return $config
->setIndent(' ')
->setLineEnding("\r\n")
->setRules([
'@PSR2' => true,
'@PhpCsFixer' => true,
'array_syntax' => ['syntax' => 'short'],
'array_indentation' => true,
'braces' => ['position_after_functions_and_oop_constructs' => 'same'],
'no_spaces_inside_parenthesis' => true,
'no_whitespace_in_blank_line' => true,
'concat_space' => ['spacing' => 'one'],
'multiline_whitespace_before_semicolons' => ['strategy' => 'no_multi_line'],
'phpdoc_summary' => false,
'phpdoc_single_line_var_spacing' => true,
'phpdoc_to_comment' => false,
'trailing_comma_in_multiline_array' => false,
'single_line_comment_style' => ['comment_types' => ['hash']],
'blank_line_before_statement' => ['statements' => ['case', 'switch', 'try']],
'no_blank_lines_after_phpdoc' => false,
'yoda_style' => ['equal' => false, 'identical' => false, 'less_and_greater' => false],
'function_declaration' => ['closure_function_spacing' => 'one'],
'braces' => ['allow_single_line_anonymous_class_with_empty_body' => true, 'allow_single_line_closure' => true, 'position_after_functions_and_oop_constructs' => 'same', 'position_after_control_structures' => 'same', 'position_after_anonymous_constructs' => 'same'],
])
->setFinder($finder);