-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.php-cs-fixer.php
More file actions
64 lines (59 loc) · 1.83 KB
/
.php-cs-fixer.php
File metadata and controls
64 lines (59 loc) · 1.83 KB
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
<?php
/*
* Copyright (c) Fusonic GmbH. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*/
declare(strict_types=1);
use PhpCsFixer\Runner\Parallel\ParallelConfigFactory;
$finder = (new PhpCsFixer\Finder())
->in(__DIR__);
return (new PhpCsFixer\Config())
->setParallelConfig(ParallelConfigFactory::detect())
->setRules([
'@PHP8x2Migration' => true,
'@Symfony' => true,
'@Symfony:risky' => true,
'date_time_immutable' => true,
'declare_strict_types' => true,
'header_comment' => [
'header' => 'Copyright (c) Fusonic GmbH. All rights reserved.'.\PHP_EOL.'Licensed under the MIT License. '.
'See LICENSE file in the project root for license information.',
'location' => 'after_open',
],
'no_useless_else' => true,
'no_useless_return' => true,
'php_unit_strict' => true,
'single_line_throw' => false,
'strict_comparison' => true,
'strict_param' => true,
'phpdoc_line_span' => true,
'blank_line_before_statement' => [
'statements' => [
'break',
'case',
'continue',
'declare',
'default',
'do',
'exit',
'for',
'foreach',
'goto',
'if',
'include',
'include_once',
'phpdoc',
'require',
'require_once',
'return',
'switch',
'throw',
'try',
'while',
'yield',
'yield_from',
],
],
])
->setFinder($finder)
->setRiskyAllowed(true);