package-template/.php-cs-fixer.php

32 lines
944 B
PHP
Raw Normal View History

2024-07-25 21:10:23 +02:00
<?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,
2024-07-29 09:49:11 +02:00
'phpdoc_align' => ['align' => 'left'],
'concat_space' => ['spacing' => 'one'],
'global_namespace_import' => [
'import_classes' => true,
'import_constants' => true,
'import_functions' => true,
],
2024-07-25 21:10:23 +02:00
])
->setFinder(PhpCsFixer\Finder::create()
->in(__DIR__.'/src')
->in(__DIR__.'/tests')
);