-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Expand file tree
/
Copy path.php-cs-fixer.dist.php
More file actions
40 lines (35 loc) · 1.24 KB
/
.php-cs-fixer.dist.php
File metadata and controls
40 lines (35 loc) · 1.24 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
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
$fileHeaderComment = <<<COMMENT
This file is part of the Symfony package.
(c) Fabien Potencier <fabien@symfony.com>
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
COMMENT;
return new PhpCsFixer\Config()
->setFinder(
PhpCsFixer\Finder::create()->in(['src', 'tests'])->append([__FILE__])
)
->setRiskyAllowed(true)
->setRules([
'@PHP8x4Migration' => true,
'@PHP8x4Migration:risky' => true,
'@Symfony' => true,
'@Symfony:risky' => true,
'declare_strict_types' => false, // depends how project wants to handle type matching and untaint user input
'header_comment' => ['header' => $fileHeaderComment, 'separate' => 'both'],
'no_useless_else' => true,
'no_useless_return' => true,
'php_unit_strict' => true,
'strict_comparison' => true,
'strict_param' => true,
])
->setCacheFile(__DIR__.'/var/.php-cs-fixer.cache')
;