This repository was archived by the owner on Feb 3, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.php_cs
56 lines (54 loc) · 1.67 KB
/
.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
51
52
53
54
55
56
<?php
$finder = PhpCsFixer\Finder::create()
->in(__DIR__.'/app')
->in(__DIR__.'/bundles')
->in(__DIR__.'/config')
->in(__DIR__.'/extensions')
->in(__DIR__.'/tests')
;
return PhpCsFixer\Config::create()
->setRules([
'@PSR2' => true,
'@Symfony' => true,
'array_syntax' => ['syntax' => 'short'],
'combine_consecutive_issets' => true,
'combine_consecutive_unsets' => true,
'compact_nullable_typehint' => true,
'escape_implicit_backslashes' => true,
'explicit_indirect_variable' => true,
'explicit_string_variable' => true,
'method_chaining_indentation' => true,
'multiline_whitespace_before_semicolons' => [
'strategy' => 'new_line_for_chained_calls',
],
'no_useless_else' => true,
'no_useless_return' => true,
'ordered_class_elements' => [
'order' => [
'use_trait',
'constant',
'property_static',
'property_public',
'property_protected',
'property_private',
'method_public_static',
'construct',
'destruct',
'magic',
'phpunit',
'method_public',
'method_protected_static',
'method_protected',
'method_private_static',
'method_private',
],
'sortAlgorithm' => 'alpha',
],
'ordered_imports' => [
'sort_algorithm' => 'alpha',
],
'simplified_null_return' => true,
'yoda_style' => true,
])
->setFinder($finder)
;