Files
php-flasher/.php-cs-fixer.dist.php
T
2024-04-09 07:57:01 +00:00

36 lines
1.1 KiB
PHP

<?php
declare(strict_types=1);
$finder = PhpCsFixer\Finder::create()
->in([
__DIR__.'/src',
__DIR__.'/tests',
__DIR__.'/phpstorm',
])
->append([__FILE__])
;
return (new PhpCsFixer\Config())
->setRiskyAllowed(true)
->setRules([
'@PSR12' => true,
'declare_strict_types' => true,
'@PHP71Migration' => true,
'@PHPUnit75Migration:risky' => true,
'@Symfony' => true,
'@Symfony:risky' => true,
'protected_to_private' => false,
'native_constant_invocation' => ['strict' => false],
'no_superfluous_phpdoc_tags' => [
'remove_inheritdoc' => true,
'allow_unused_params' => true, // for future-ready params, to be replaced with https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues/7377
],
'modernize_strpos' => true,
'get_class_to_class_keyword' => true,
'nullable_type_declaration' => true,
'trailing_comma_in_multiline' => ['elements' => ['arrays', 'match', 'parameters']],
])
->setFinder($finder)
->setCacheFile('.cache/php-cs-fixer/cache.json');