|
10 | 10 | * with this source code in the file LICENSE. |
11 | 11 | */ |
12 | 12 |
|
13 | | -$header = <<<'EOF' |
14 | | -This file is part of PHP CS Fixer. |
| 13 | +// @TODO 3.0: make this file the only distributed config file and remove `.php_cs.dist` file. |
15 | 14 |
|
16 | | -(c) Fabien Potencier <fabien@symfony.com> |
17 | | - Dariusz Rumiński <dariusz.ruminski@gmail.com> |
18 | | -
|
19 | | -This source file is subject to the MIT license that is bundled |
20 | | -with this source code in the file LICENSE. |
21 | | -EOF; |
22 | | - |
23 | | -$finder = PhpCsFixer\Finder::create() |
24 | | - ->exclude('tests/Fixtures') |
25 | | - ->in(__DIR__) |
26 | | - ->append([ |
27 | | - __DIR__.'/dev-tools/doc.php', |
28 | | - __DIR__.'/php-cs-fixer', |
29 | | - ]) |
30 | | -; |
31 | | - |
32 | | -$config = new PhpCsFixer\Config(); |
33 | | -$config |
34 | | - ->setRiskyAllowed(true) |
35 | | - ->setRules([ |
36 | | - '@PHP56Migration' => true, |
37 | | - '@PHPUnit75Migration:risky' => true, |
38 | | - '@PhpCsFixer' => true, |
39 | | - '@PhpCsFixer:risky' => true, |
40 | | - 'header_comment' => ['header' => $header], |
41 | | - 'list_syntax' => ['syntax' => 'long'], |
42 | | - ]) |
43 | | - ->setFinder($finder) |
44 | | -; |
45 | | - |
46 | | -// special handling of fabbot.io service if it's using too old PHP CS Fixer version |
47 | | -if (false !== getenv('FABBOT_IO')) { |
48 | | - try { |
49 | | - PhpCsFixer\FixerFactory::create() |
50 | | - ->registerBuiltInFixers() |
51 | | - ->registerCustomFixers($config->getCustomFixers()) |
52 | | - ->useRuleSet(new PhpCsFixer\RuleSet($config->getRules())) |
53 | | - ; |
54 | | - } catch (PhpCsFixer\ConfigurationException\InvalidConfigurationException $e) { |
55 | | - $config->setRules([]); |
56 | | - } catch (UnexpectedValueException $e) { |
57 | | - $config->setRules([]); |
58 | | - } catch (InvalidArgumentException $e) { |
59 | | - $config->setRules([]); |
60 | | - } |
61 | | -} |
62 | | - |
63 | | -return $config; |
| 15 | +return require ".php_cs.dist"; |
0 commit comments