-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3c3df52
commit 1734a49
Showing
1 changed file
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of PHP CS Fixer. | ||
* | ||
* (c) Fabien Potencier <fabien@symfony.com> | ||
* Dariusz Rumiński <dariusz.ruminski@gmail.com> | ||
* | ||
* This source file is subject to the MIT license that is bundled | ||
* with this source code in the file LICENSE. | ||
*/ | ||
|
||
use PhpCsFixer\Config; | ||
use PhpCsFixer\Finder; | ||
|
||
$header = <<<'EOF' | ||
This file is part of PHP CS Fixer. | ||
(c) Fabien Potencier <fabien@symfony.com> | ||
Dariusz Rumiński <dariusz.ruminski@gmail.com> | ||
This source file is subject to the MIT license that is bundled | ||
with this source code in the file LICENSE. | ||
EOF; | ||
|
||
$finder = (new Finder()) | ||
->ignoreDotFiles(false) | ||
->ignoreVCSIgnored(true) | ||
->exclude(['dev-tools/phpstan', 'tests/Fixtures']) | ||
->in(__DIR__) | ||
; | ||
|
||
return (new Config()) | ||
->setRiskyAllowed(true) | ||
->setRules([ | ||
'@PHP74Migration' => true, | ||
'@PHP74Migration:risky' => true, | ||
'@PHPUnit100Migration:risky' => true, | ||
'@PhpCsFixer' => true, | ||
'@PhpCsFixer:risky' => true, | ||
'general_phpdoc_annotation_remove' => ['annotations' => ['expectedDeprecation']], // one should use PHPUnit built-in method instead | ||
'header_comment' => ['header' => $header], | ||
'modernize_strpos' => true, // needs PHP 8+ or polyfill | ||
'no_useless_concat_operator' => false, // TODO switch back on when the `src/Console/Application.php` no longer needs the concat | ||
'numeric_literal_separator' => true, | ||
]) | ||
->setFinder($finder) | ||
; |