-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.php-cs-fixer.dist.php
59 lines (54 loc) · 1.75 KB
/
.php-cs-fixer.dist.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
<?php
declare(strict_types=1);
$header = <<<'EOF'
This file is part of the php-chmod package.
(c) Mathias Reker <[email protected]>
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
EOF;
$finder = PhpCsFixer\Finder::create()
->ignoreDotFiles(false)
->in([__DIR__]);
$config = new PhpCsFixer\Config();
$config
->setRiskyAllowed(true)
->setRules([
'header_comment' => [
'header' => $header,
'comment_type' => 'PHPDoc',
'location' => 'after_open',
'separate' => 'bottom'
],
'@PHP74Migration' => true,
'@PHP74Migration:risky' => true,
'@Symfony' => true,
'@Symfony:risky' => true,
'concat_space' => [
'spacing' => 'one',
],
'array_indentation' => true,
'general_phpdoc_annotation_remove' => [
'annotations' => [
'expectedDeprecation'
]
],
'use_arrow_functions' => true,
'control_structure_braces' => true,
'control_structure_continuation_position' => true,
'self_static_accessor' => true,
'ordered_interfaces' => true,
'phpdoc_var_annotation_correct_order' => true,
'return_assignment' => true,
'no_useless_else' => true,
'no_superfluous_elseif' => true,
'no_useless_return' => true,
'multiline_comment_opening_closing' => true,
'no_null_property_initialization' => true,
'operator_linebreak' => true,
'method_chaining_indentation' => true,
'strict_param' => true,
'strict_comparison' => true,
])
->setFinder($finder)
->setLineEnding(PHP_EOL);
return $config;