-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.php-cs-fixer.php
62 lines (54 loc) · 2.02 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?php
declare(strict_types=1);
/*
* This file is part of the Zapoyok project.
*
* (c) Jérôme Fix <jerome.fix@zapoyok.info>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
$header = <<<'HEADER'
This file is part of the Zapoyok project.
(c) Jérôme Fix <jerome.fix@zapoyok.info>
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
HEADER;
$finder = PhpCsFixer\Finder::create()
->in('src/')
;
$config = new PhpCsFixer\Config();
return $config
->setRiskyAllowed(true)
->setRules([
'@PHP71Migration' => true,
'@PHP71Migration:risky' => true,
'@PHP73Migration' => true,
'@PhpCsFixer' => true,
'@Symfony' => true,
'@Symfony:risky' => true,
'@DoctrineAnnotation' => true,
'array_syntax' => ['syntax' => 'short'],
'general_phpdoc_annotation_remove' => ['annotations' => ['author', 'package', 'subpackage']],
'no_useless_return' => true,
'phpdoc_to_comment' => false,
'method_chaining_indentation' => false,
'indentation_type' => true,
'ordered_imports' => true,
'line_ending' => true,
'no_superfluous_phpdoc_tags' => true,
'concat_space' => ['spacing' => 'one'],
'class_definition' => [
'multi_line_extends_each_single_line' => true,
'single_item_single_line' => false,
'single_line' => false,
],
'php_unit_test_class_requires_covers' => false,
'phpdoc_order' => true,
'phpdoc_align' => ['align' => 'vertical'],
'self_accessor' => false,
'header_comment' => ['header' => $header, 'comment_type' => 'comment', 'location' => 'after_declare_strict'],
])
->setUsingCache(true)
->setFinder($finder)
;