-
Notifications
You must be signed in to change notification settings - Fork 31
/
.php-cs-fixer.dist.php
81 lines (75 loc) · 2.71 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?php
$header = <<<EOF
This file is part of the RollerworksPasswordStrengthValidator package.
(c) Sebastiaan Stok <[email protected]>
This source file is subject to the MIT license that is bundled
with this source code in the file LICENSE.
EOF;
/** @var \Symfony\Component\Finder\Finder $finder */
$finder = PhpCsFixer\Finder::create();
$finder
->in([__DIR__.'/src', __DIR__.'/tests'])
;
$config = new PhpCsFixer\Config();
$config
->setRiskyAllowed(true)
->setRules([
'@PhpCsFixer' => true,
'@PhpCsFixer:risky' => true,
'@Symfony' => true,
'@Symfony:risky' => true,
'@PHP73Migration' => true,
'@PHPUnit84Migration:risky' => true,
'@DoctrineAnnotation' => true,
'blank_line_before_statement' => [
'statements' => [
'break',
'case',
'continue',
'declare',
'default',
'do',
'exit',
'for',
'foreach',
'goto',
'if',
'include',
'include_once',
'require',
'require_once',
'return',
'switch',
'throw',
'try',
'while',
],
],
'comment_to_phpdoc' => ['ignored_tags' => ['codeCoverageIgnoreStart', 'codeCoverageIgnoreEnd']],
'concat_space' => ['spacing' => 'one'],
'doctrine_annotation_array_assignment' => ['operator' => '='],
'general_phpdoc_annotation_remove' => ['annotations' => ['author', 'since', 'package', 'subpackage']],
'header_comment' => ['header' => $header],
'list_syntax' => ['syntax' => 'short'],
'mb_str_functions' => true,
'method_argument_space' => ['on_multiline' => 'ignore'],
'method_chaining_indentation' => false,
'no_extra_blank_lines' => ['tokens' => ['extra', 'use_trait']],
'no_superfluous_phpdoc_tags' => ['remove_inheritdoc' => true],
'not_operator_with_successor_space' => true,
'ordered_class_elements' => false,
'ordered_imports' => true,
'php_unit_method_casing' => ['case' => 'snake_case'],
'php_unit_strict' => false,
'php_unit_test_annotation' => ['style' => 'annotation'],
'php_unit_test_class_requires_covers' => false,
'phpdoc_to_comment' => false,
'phpdoc_var_without_name' => false,
'self_static_accessor' => true,
'single_line_throw' => false,
'static_lambda' => true,
'strict_comparison' => false,
'yoda_style' => ['equal' => false, 'identical' => false],
])
->setFinder($finder);
return $config;