-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
.php_cs.dist
65 lines (59 loc) · 1.84 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?php
/*
* This file is part of the BZiON project.
*
* (c) Copyright 2013-2018 Vladimir Jimenez
* (c) Copyright 2018 BZFlag & Associates
*
* For the full copyright and license information, please view the LICENSE.md
* file that was distributed with this source code.
*/
$finder = PhpCsFixer\Finder::create()
->in('app')
->in('controllers')
->in('migrations')
->in('models')
->in('src')
->in('tests')
->exclude('cache')
;
$licenseHeader = <<<EOL
This file is part of the BZiON project.
(c) Copyright 2013-2018 Vladimir Jimenez
(c) Copyright 2018 BZFlag & Associates
For the full copyright and license information, please view the LICENSE.md
file that was distributed with this source code.
EOL;
return PhpCsFixer\Config::create()
->setRules([
'@Symfony' => true,
'array_syntax' => ['syntax' => 'short'],
'concat_space' => ['spacing' => 'one'],
'header_comment' => [
'header' => $licenseHeader,
'commentType' => 'comment',
'location' => 'after_open',
'separate' => 'both',
],
'no_short_echo_tag' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'ordered_imports' => [
'sortAlgorithm' => 'alpha',
'importsOrder' => [
'const',
'class',
'function',
],
],
'phpdoc_add_missing_param_annotation' => ['only_untyped' => false],
'phpdoc_order' => true,
'php_unit_fqcn_annotation' => true, // @todo Change this when PHPUnit 6 is the new minimum version
'ternary_to_null_coalescing' => false, // @todo Change this when PHP 7.0 is the minimum version
'yoda_style' => [
'equal' => false,
'identical' => false,
],
])
->setFinder($finder)
;