-
Notifications
You must be signed in to change notification settings - Fork 5
/
.php_cs
45 lines (40 loc) · 1.16 KB
/
.php_cs
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
<?php
$date = date('Y');
$header = <<<EOF
Copyright (c) $date Heimrich & Hannot GmbH
@license LGPL-3.0-or-later
EOF;
$finder = PhpCsFixer\Finder::create()
->exclude('Resources')
->exclude('Fixtures')
->in([__DIR__.'/src', __DIR__.'/tests'])
->exclude('vendor')
->in([__DIR__])
;
return PhpCsFixer\Config::create()
->setRules([
'@Symfony' => true,
'@Symfony:risky' => true,
'psr0' => false,
'strict_comparison' => false,
'strict_param' => true,
'array_syntax' => ['syntax' => 'short'],
'heredoc_to_nowdoc' => true,
'header_comment' => ['header' => $header],
'ordered_imports' => true,
'ordered_class_elements' => true,
'php_unit_strict' => true,
'phpdoc_order' => true,
'no_useless_return' => true,
'no_useless_else' => true,
'no_unreachable_default_argument_value' => true,
'combine_consecutive_unsets' => true,
'general_phpdoc_annotation_remove' => [
'expectedException',
'expectedExceptionMessage',
],
])
->setFinder($finder)
->setRiskyAllowed(true)
->setUsingCache(false)
;