-
Notifications
You must be signed in to change notification settings - Fork 0
/
.php_cs.dist
52 lines (47 loc) · 1.86 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
$finder = PhpCsFixer\Finder::create()
->exclude('vendor')
->exclude('tests/_helpers/_generated')
->exclude('app/var/compiledTemplates')
->in(__DIR__)
;
return PhpCsFixer\Config::create()
->setRules(array(
'@PSR2' => true,
'array_syntax' => array('syntax' => 'short'),
'full_opening_tag' => true,
'trailing_comma_in_multiline_array' => true,
// '@PHP71Migration' => true,
'binary_operator_spaces' => ['align_double_arrow' => false,'align_equals'=>false],
'blank_line_after_opening_tag' => true,
'blank_line_before_statement' => true,
'braces' => [
'position_after_control_structures' => 'same',
'position_after_functions_and_oop_constructs' => 'next',
],
'combine_consecutive_unsets' => true,
'single_line_comment_style' => ['comment_types' => ['asterisk','hash']],
'ordered_class_elements' => true,
'ordered_imports' => true,
'standardize_not_equals' => true,
'trailing_comma_in_multiline_array' => true,
'visibility_required' => true,
// Whitespace related
'no_whitespace_before_comma_in_array' => true,
'trim_array_spaces' => true,
'indentation_type' => true,
'line_ending' => true,
'no_whitespace_in_blank_line' => true,
'no_multiline_whitespace_before_semicolons' => true,
'no_extra_consecutive_blank_lines' => true,
'whitespace_after_comma_in_array' => true,
'method_argument_space' => ['ensure_fully_multiline' => true, 'keep_multiple_spaces_after_comma' => false],
'no_extra_consecutive_blank_lines' => true,
'no_trailing_comma_in_singleline_array' => true,
))
->setFinder($finder)
// Indent with 4 spaces
->setIndent(" ")
// Line ending is just a newline
->setLineEnding("\n")
;