-
-
Notifications
You must be signed in to change notification settings - Fork 73
Expand file tree
/
Copy path.php-cs-fixer.php
More file actions
48 lines (42 loc) · 1.5 KB
/
Copy path.php-cs-fixer.php
File metadata and controls
48 lines (42 loc) · 1.5 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
<?php
/*
* This file is part of Gitonomy.
*
* (c) Alexandre Salomé <alexandre.salome@gmail.com>
* (c) Julien DIDIER <genzo.wm@gmail.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
$fileHeaderComment = <<<'EOF'
This file is part of Gitonomy.
(c) Alexandre Salomé <alexandre.salome@gmail.com>
(c) Julien DIDIER <genzo.wm@gmail.com>
This source file is subject to the MIT license that is bundled
with this source code in the file LICENSE.
EOF;
$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
->append([
__FILE__,
'castor.php',
])
->notPath('var')
;
return new PhpCsFixer\Config()
->setRiskyAllowed(true)
->setUnsupportedPhpVersionAllowed(true)
->setRules([
'@PHP84Migration' => 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],
'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
])
->setFinder($finder)
;