-
Notifications
You must be signed in to change notification settings - Fork 3
/
.php-cs-fixer.php
47 lines (44 loc) · 1.43 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
<?php
use PhpCsFixer\Config;
$finder = PhpCsFixer\Finder::create()
->in(__DIR__ . '/src');
return (new Config())
->setFinder($finder)
->setRiskyAllowed(true)
->setRules([
'@PSR2' => true,
'@PHP70Migration' => true,
'@PHP70Migration:risky' => true,
'@PHP71Migration' => true,
'@PHP71Migration:risky' => true,
'@PhpCsFixer' => true,
'@PhpCsFixer:risky' => true,
'@Symfony' => true,
'@Symfony:risky' => true,
'@DoctrineAnnotation' => true,
'list_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => [
'operators' => [
'=' => 'align',
'=>' => 'align',
'+=' => 'align',
'-=' => 'align',
'*=' => 'align',
'%=' => 'align',
'.=' => 'align',
'^=' => 'align',
],
],
'yoda_style' => false,
'class_definition' => [
'single_line' => false,
],
'native_function_invocation' => true,
'native_function_casing' => true,
'native_constant_invocation' => true,
'object_operator_without_whitespace' => false,
'multiline_whitespace_before_semicolons' => [
'strategy' => 'no_multi_line',
],
'trailing_comma_in_multiline' => ['elements' => ['arrays', 'arguments', 'parameters', 'match']],
]);