-
Notifications
You must be signed in to change notification settings - Fork 25
/
.php-cs-fixer.php
42 lines (37 loc) · 1.49 KB
/
.php-cs-fixer.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
<?php
/*
* This file is part of JoliTypo - a project by JoliCode.
*
* This software consists of voluntary contributions made by many individuals
* and is licensed under the MIT license.
*/
$fileHeaderComment = <<<'EOF'
This file is part of JoliTypo - a project by JoliCode.
This software consists of voluntary contributions made by many individuals
and is licensed under the MIT license.
EOF;
$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
->notPath('src/JoliTypo/Bridge/Symfony/DependencyInjection/Configuration.php')
->append([
__FILE__,
])
;
return (new PhpCsFixer\Config())
->setRiskyAllowed(true)
->setRules([
'@PHP81Migration' => true,
'@PhpCsFixer' => true,
'@Symfony' => true,
'@Symfony:risky' => true,
'php_unit_internal_class' => false, // From @PhpCsFixer but we don't want it
'php_unit_test_class_requires_covers' => false, // From @PhpCsFixer but we don't want it
'phpdoc_add_missing_param_annotation' => false, // From @PhpCsFixer but we don't want it
'header_comment' => ['header' => $fileHeaderComment],
'concat_space' => ['spacing' => 'one'],
'ordered_class_elements' => true, // Symfony(PSR12) override the default value, but we don't want
'blank_line_before_statement' => true, // Symfony(PSR12) override the default value, but we don't want
'array_indentation' => false, // Do not work well with "command builder"
])
->setFinder($finder)
;