forked from doctrine-extensions/DoctrineExtensions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.php-cs-fixer.dist.php
73 lines (68 loc) · 2.55 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
<?php
declare(strict_types=1);
/*
* This file is part of the Doctrine Behavioral Extensions package.
* (c) Gediminas Morkevicius <[email protected]> http://www.gediminasm.org
* 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 Doctrine Behavioral Extensions package.
(c) Gediminas Morkevicius <[email protected]> http://www.gediminasm.org
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([
__DIR__.'/example',
__DIR__.'/src',
__DIR__.'/tests',
])
->append([__FILE__])
->exclude([
__DIR__.'/tests/data',
]);
return (new PhpCsFixer\Config())
->setRules([
'@PSR2' => true,
'@Symfony' => true,
'array_syntax' => ['syntax' => 'short'],
'blank_line_before_statement' => true,
'combine_consecutive_issets' => true,
'combine_consecutive_unsets' => true,
// @todo: Uncomment the following rule in the next major release.
// 'declare_strict_types' => true,
'error_suppression' => true,
'header_comment' => ['header' => $header],
'is_null' => false,
'list_syntax' => ['syntax' => 'short'],
'modernize_types_casting' => true,
'no_homoglyph_names' => true,
'no_null_property_initialization' => true,
'no_superfluous_elseif' => true,
'no_unset_on_property' => true,
'no_useless_else' => true,
'ordered_class_elements' => true,
'ordered_imports' => ['sort_algorithm' => 'alpha'],
'phpdoc_summary' => false,
'phpdoc_to_comment' => false,
'php_unit_construct' => true,
'php_unit_dedicate_assert' => true,
'php_unit_dedicate_assert_internal_type' => true,
'php_unit_method_casing' => false,
'php_unit_mock' => true,
'php_unit_namespaced' => true,
'php_unit_set_up_tear_down_visibility' => true,
'php_unit_strict' => true,
'php_unit_test_annotation' => ['style' => 'prefix'],
'php_unit_test_case_static_method_calls' => true,
'psr_autoloading' => true,
'random_api_migration' => true,
'self_accessor' => true,
'static_lambda' => true,
'strict_param' => true,
'ternary_to_null_coalescing' => true,
])
->setFinder($finder)
->setRiskyAllowed(true)
->setUsingCache(true);