package-template/.php-cs-fixer.php
2024-07-25 22:10:23 +03:00

26 lines
788 B
PHP

<?php
declare(strict_types=1);
$config = new PhpCsFixer\Config();
return $config
->setRiskyAllowed(true)
->setRules([
'@PSR12' => true,
'@Symfony' => true,
'assign_null_coalescing_to_coalesce_equal' => true,
'combine_consecutive_issets' => true,
'combine_consecutive_unsets' => true,
'declare_strict_types' => true,
'nullable_type_declaration' => true,
'phpdoc_var_annotation_correct_order' => true,
'single_line_empty_body' => true,
'ternary_to_null_coalescing' => true,
])
->setFinder(PhpCsFixer\Finder::create()
// ->exclude('folder-to-exclude') // if you want to exclude some folders, you can do it like this!
->in(__DIR__.'/src')
->in(__DIR__.'/tests')
);