forked from grocy/grocy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.php-cs-fixer.php
54 lines (52 loc) · 1.75 KB
/
.php-cs-fixer.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
49
50
51
52
53
54
<?php
$finder = PhpCsFixer\Finder::create()
->exclude(['packages'])
->ignoreVCSIgnored(true)
->files()->name('*.php')
->in(__DIR__);
$cfg = new PhpCsFixer\Config();
return $cfg
->setRules([
'@PSR2' => true,
'array_indentation' => true,
'array_syntax' => ['syntax' => 'short'],
'combine_consecutive_unsets' => true,
'class_attributes_separation' => true,
'class_attributes_separation' => ['elements' => ['const' => 'none', 'property' => 'none']],
'multiline_whitespace_before_semicolons' => false,
'single_quote' => true,
'blank_line_after_opening_tag' => true,
'curly_braces_position' => [
'control_structures_opening_brace' => 'next_line_unless_newline_at_signature_end',
'anonymous_functions_opening_brace' => 'next_line_unless_newline_at_signature_end'
],
'control_structure_continuation_position' => [
'position' => 'next_line'
],
'cast_spaces' => [
'space' => 'none'
],
'concat_space' => ['spacing' => 'one'],
'declare_equal_normalize' => true,
'type_declaration_spaces' => true,
'single_line_comment_style' => ['comment_types' => ['hash']],
'include' => true,
'lowercase_cast' => true,
'no_leading_import_slash' => true,
'no_leading_namespace_whitespace' => true,
'no_multiline_whitespace_around_double_arrow' => true,
'no_spaces_around_offset' => true,
'no_whitespace_before_comma_in_array' => true,
'no_whitespace_in_blank_line' => true,
'object_operator_without_whitespace' => true,
'blank_lines_before_namespace' => true,
'ternary_operator_spaces' => true,
'trim_array_spaces' => true,
'unary_operator_spaces' => true,
'whitespace_after_comma_in_array' => true,
'no_trailing_comma_in_singleline' => true
])
->setIndent("\t")
->setLineEnding("\n")
->setUsingCache(false)
->setFinder($finder);