2017-07-01 07:52:38 +00:00
|
|
|
<?php
|
|
|
|
|
2022-08-01 18:18:49 +00:00
|
|
|
$config = new PhpCsFixer\Config();
|
2024-01-01 18:11:01 +00:00
|
|
|
|
2022-08-01 18:18:49 +00:00
|
|
|
return $config
|
2017-07-01 07:52:38 +00:00
|
|
|
->setRiskyAllowed(true)
|
|
|
|
->setRules([
|
|
|
|
'@Symfony' => true,
|
|
|
|
'@Symfony:risky' => true,
|
|
|
|
'array_syntax' => [
|
2024-01-01 18:11:01 +00:00
|
|
|
'syntax' => 'short',
|
2017-07-01 07:52:38 +00:00
|
|
|
],
|
|
|
|
'combine_consecutive_unsets' => true,
|
|
|
|
'heredoc_to_nowdoc' => true,
|
2022-08-01 18:15:15 +00:00
|
|
|
'no_extra_blank_lines' => [
|
2022-08-01 18:16:02 +00:00
|
|
|
'tokens' => [
|
|
|
|
'break',
|
|
|
|
'continue',
|
|
|
|
'extra',
|
|
|
|
'return',
|
|
|
|
'throw',
|
|
|
|
'use',
|
|
|
|
'parenthesis_brace_block',
|
|
|
|
'square_brace_block',
|
2024-01-01 18:11:01 +00:00
|
|
|
'curly_brace_block',
|
2022-08-01 18:16:02 +00:00
|
|
|
],
|
2017-07-01 07:52:38 +00:00
|
|
|
],
|
|
|
|
'no_unreachable_default_argument_value' => true,
|
2024-01-01 18:11:01 +00:00
|
|
|
'no_useless_concat_operator' => false,
|
2017-07-01 07:52:38 +00:00
|
|
|
'no_useless_else' => true,
|
|
|
|
'no_useless_return' => true,
|
|
|
|
'ordered_class_elements' => true,
|
|
|
|
'ordered_imports' => true,
|
|
|
|
'php_unit_strict' => true,
|
|
|
|
'phpdoc_order' => true,
|
2024-01-01 18:11:01 +00:00
|
|
|
'phpdoc_separation' => false,
|
2022-08-01 18:15:15 +00:00
|
|
|
// 'psr_autoloading' => true,
|
2017-07-01 07:52:38 +00:00
|
|
|
'strict_comparison' => true,
|
|
|
|
'strict_param' => true,
|
|
|
|
'concat_space' => [
|
2024-01-01 18:11:01 +00:00
|
|
|
'spacing' => 'one',
|
2017-07-01 07:52:38 +00:00
|
|
|
],
|
|
|
|
])
|
|
|
|
->setFinder(
|
|
|
|
PhpCsFixer\Finder::create()
|
|
|
|
->exclude([
|
2020-11-25 07:46:45 +00:00
|
|
|
'node_modules',
|
2017-07-01 07:52:38 +00:00
|
|
|
'vendor',
|
|
|
|
'var',
|
2024-01-01 18:11:01 +00:00
|
|
|
'web',
|
2017-07-01 07:52:38 +00:00
|
|
|
])
|
|
|
|
->in(__DIR__)
|
|
|
|
)
|
2022-08-01 18:11:30 +00:00
|
|
|
->setCacheFile('.php-cs-fixer.cache')
|
2017-07-01 07:52:38 +00:00
|
|
|
;
|