-
-
Notifications
You must be signed in to change notification settings - Fork 27
/
.php-cs-fixer.php
46 lines (41 loc) · 1.47 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
<?php
$header = <<<'EOF'
This file is part of the "elao/enum" package.
Copyright (C) Elao
@author Elao <contact@elao.com>
EOF;
$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
->exclude('tests/Fixtures/Integration/Symfony/var')
->exclude('tests/Unit/Bridge/Doctrine/DBAL/Types/TypesDumperTest')
->exclude('tests/Unit/Bridge/Doctrine/ODM/Types/TypesDumperTest')
;
return (new PhpCsFixer\Config())
->setRiskyAllowed(true)
->setUsingCache(true)
->setFinder($finder)
->setRules([
'@Symfony' => true,
'array_syntax' => ['syntax' => 'short'],
'concat_space' => ['spacing' => 'one'],
'declare_strict_types' => true,
'header_comment' => ['header' => $header],
'native_function_invocation' => ['include' => ['@compiler_optimized']],
'no_unneeded_final_method' => false, // final private __construct is a valid use-case
'ordered_imports' => true,
'php_unit_namespaced' => true,
'php_unit_method_casing' => false,
'phpdoc_annotation_without_dot' => false,
'phpdoc_to_comment' => ['ignored_tags' => [
// https://github.com/phpstan/phpstan/issues/5465
'use',
]],
'phpdoc_summary' => false,
'phpdoc_order' => true,
'phpdoc_trim_consecutive_blank_line_separation' => true,
'psr_autoloading' => true,
'single_line_throw' => false,
'simplified_null_return' => false,
'yoda_style' => [],
])
;