|
1 | 1 | <?php |
2 | 2 |
|
3 | | -$header = <<<'EOF' |
| 3 | +declare(strict_types=1); |
| 4 | + |
| 5 | +/* |
| 6 | + * This file is part of JoliCode's Slack PHP API project. |
| 7 | + * |
| 8 | + * (c) JoliCode <coucou@jolicode.com> |
| 9 | + * |
| 10 | + * For the full copyright and license information, please view the LICENSE |
| 11 | + * file that was distributed with this source code. |
| 12 | + */ |
| 13 | + |
| 14 | +$fileHeaderComment = <<<'EOF' |
4 | 15 | This file is part of JoliCode's Slack PHP API project. |
5 | 16 |
|
6 | 17 | (c) JoliCode <coucou@jolicode.com> |
|
13 | 24 | ->in(__DIR__) |
14 | 25 | ->exclude('docs') |
15 | 26 | ->exclude('ci_generated') |
| 27 | + ->append([ |
| 28 | + __FILE__, |
| 29 | + ]) |
16 | 30 | ; |
17 | | -$config = new PhpCsFixer\Config(); |
18 | 31 |
|
19 | | -return $config->setRules([ |
| 32 | +return (new PhpCsFixer\Config()) |
| 33 | + ->setRiskyAllowed(true) |
| 34 | + ->setRules([ |
| 35 | + '@PHP71Migration' => true, |
| 36 | + '@PhpCsFixer' => true, |
20 | 37 | '@Symfony' => true, |
21 | 38 | '@Symfony:risky' => true, |
22 | | - '@PHP71Migration' => true, |
23 | | - '@PHP71Migration:risky' => true, |
24 | | - 'header_comment' => array('header' => $header), |
25 | | - 'strict_param' => true, |
26 | | - 'array_syntax' => ['syntax' => 'short'], |
| 39 | + 'php_unit_internal_class' => false, // From @PhpCsFixer but we don't want it |
| 40 | + 'php_unit_test_class_requires_covers' => false, // From @PhpCsFixer but we don't want it |
| 41 | + 'phpdoc_add_missing_param_annotation' => false, // From @PhpCsFixer but we don't want it |
| 42 | + 'header_comment' => ['header' => $fileHeaderComment], |
| 43 | + 'concat_space' => ['spacing' => 'one'], |
| 44 | + 'declare_strict_types' => true, |
| 45 | + 'ordered_class_elements' => true, // Symfony(PSR12) override the default value, but we don't want |
| 46 | + 'blank_line_before_statement' => true, // Symfony(PSR12) override the default value, but we don't want |
27 | 47 | ]) |
28 | | - ->setRiskyAllowed(true) |
29 | 48 | ->setFinder($finder) |
30 | 49 | ; |
0 commit comments