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