-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.project.php_cs
50 lines (42 loc) · 1.12 KB
/
.project.php_cs
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
<?php
$finder = PhpCsFixer\Finder::create()
->exclude('vendor')
->ignoreDotFiles(true)
->ignoreUnreadableDirs()
->ignoreVCSIgnored(true)
->in(__DIR__)
;
$config = new PhpCsFixer\Config();
return $config->setRules([
'@PSR12' => true,
'indentation_type' => false,
'array_syntax' => ['syntax' => 'short'],
'concat_space' => ['spacing' => 'one'],
'no_empty_statement' => false,
'no_whitespace_in_blank_line' => true,
'blank_line_after_opening_tag' => true,
'cast_spaces' => ['space' => 'none'],
'class_attributes_separation' => [
'elements' => [
'method' => 'one',
'property' => 'one',
'const' => 'one',
],
],
'function_typehint_space' => true,
'include' => true,
'lowercase_cast' => true,
'lowercase_static_reference' => true,
'magic_constant_casing' => true,
'native_function_casing' => true,
'no_alternative_syntax' => true,
'ternary_operator_spaces' => true,
'unary_operator_spaces' => true,
'multiline_whitespace_before_semicolons' => [
'strategy' => 'new_line_for_chained_calls',
],
'trailing_comma_in_multiline' => true,
])
->setIndent(' ')
->setFinder($finder)
;