-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.php-cs-fixer.dist.php
50 lines (44 loc) · 1.44 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
<?php
/*
* PsrHttpMessageBundle by @ajgarlag
*
* Copyright (c) 2010-2022 Fabien Potencier
* Copyright (c) 2022 Antonio J. García Lagar
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
if (!file_exists(__DIR__.'/src')) {
exit(0);
}
$header = <<<EOF
PsrHttpMessageBundle by @ajgarlag
Copyright (c) 2010-2022 Fabien Potencier
Copyright (c) 2022 Antonio J. García Lagar
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
EOF;
return (new PhpCsFixer\Config())
->setRules([
'@Symfony' => true,
'@Symfony:risky' => true,
'@PHPUnit75Migration:risky' => true,
'php_unit_dedicate_assert' => ['target' => '5.6'],
'phpdoc_no_empty_return' => false, // triggers almost always false positive
'array_syntax' => ['syntax' => 'short'],
'fopen_flags' => false,
'ordered_imports' => true,
'phpdoc_trim_consecutive_blank_line_separation' => true,
'no_superfluous_phpdoc_tags' => ['allow_mixed' => true],
'protected_to_private' => false,
'combine_nested_dirname' => true,
'header_comment' => ['header' => $header],
])
->setRiskyAllowed(true)
->setFinder(
PhpCsFixer\Finder::create()
->in(__DIR__.'/{src,tests}')
->exclude(['cache'])
->append([__FILE__])
)
;