-
Notifications
You must be signed in to change notification settings - Fork 0
/
.php_cs.dist
49 lines (47 loc) · 1.8 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
<?php
$finder = PhpCsFixer\Finder::create()
->in(__DIR__ . '/src')
->in(__DIR__ . '/tests');
return PhpCsFixer\Config::create()
->setRules([
'@PSR1' => true,
'@PSR2' => true,
'array_syntax' => ['syntax' => 'short'],
'blank_line_before_statement' => true,
'braces' => [
'position_after_functions_and_oop_constructs' => 'same',
],
'explicit_string_variable' => true,
'function_typehint_space' => true,
'list_syntax' => ['syntax' => 'short'],
'magic_constant_casing' => true,
'native_function_casing' => true,
'no_extra_blank_lines' => true,
'no_leading_import_slash' => true,
'no_mixed_echo_print' => ['use' => 'echo'],
'no_multiline_whitespace_around_double_arrow' => true,
'no_multiline_whitespace_before_semicolons' => true,
'no_singleline_whitespace_before_semicolons' => true,
'no_spaces_around_offset' => true,
'no_trailing_comma_in_singleline_array' => true,
'no_unneeded_control_parentheses' => true,
'no_unneeded_curly_braces' => true,
'no_unset_cast' => true,
'no_unused_imports' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'no_whitespace_before_comma_in_array' => true,
'no_whitespace_in_blank_line' => true,
'ordered_imports' => true,
'short_scalar_cast' => true,
'simplified_null_return' => true,
'single_quote' => true,
'ternary_operator_spaces' => true,
'ternary_to_null_coalescing' => true,
'trailing_comma_in_multiline_array' => true,
'unary_operator_spaces' => true,
'whitespace_after_comma_in_array' => true,
])
->setFinder($finder)
->setIndent("\t")
->setLineEnding("\n");