2017-06-04 00:05:31 +02:00
|
|
|
<?php
|
|
|
|
|
2021-01-23 21:33:34 +01:00
|
|
|
use PhpCsFixer\Config;
|
|
|
|
use PhpCsFixer\Finder;
|
|
|
|
|
2021-01-23 22:44:35 +01:00
|
|
|
$finder = (new Finder())->in(__DIR__)->exclude(['vendor', 'node_modules', 'storage', 'bootstrap/cache']);
|
2017-06-04 00:05:31 +02:00
|
|
|
|
2021-01-23 22:44:35 +01:00
|
|
|
return (new Config())
|
2021-01-23 21:33:34 +01:00
|
|
|
->setRiskyAllowed(true)
|
|
|
|
->setFinder($finder)
|
2017-08-22 05:06:52 +02:00
|
|
|
->setRules([
|
|
|
|
'@Symfony' => true,
|
|
|
|
'@PSR1' => true,
|
|
|
|
'@PSR2' => true,
|
2021-01-23 21:33:34 +01:00
|
|
|
'@PSR12' => true,
|
2017-08-22 05:06:52 +02:00
|
|
|
'align_multiline_comment' => ['comment_type' => 'phpdocs_like'],
|
|
|
|
'combine_consecutive_unsets' => true,
|
|
|
|
'concat_space' => ['spacing' => 'one'],
|
|
|
|
'heredoc_to_nowdoc' => true,
|
|
|
|
'no_alias_functions' => true,
|
|
|
|
'no_unreachable_default_argument_value' => true,
|
|
|
|
'no_useless_return' => true,
|
2017-09-05 02:07:00 +02:00
|
|
|
'ordered_imports' => [
|
|
|
|
'sortAlgorithm' => 'length',
|
|
|
|
],
|
2017-08-22 05:06:52 +02:00
|
|
|
'random_api_migration' => true,
|
2017-11-05 20:33:42 +01:00
|
|
|
'ternary_to_null_coalescing' => true,
|
|
|
|
'yoda_style' => [
|
|
|
|
'equal' => false,
|
|
|
|
'identical' => false,
|
|
|
|
'less_and_greater' => false,
|
2017-12-02 03:10:06 +01:00
|
|
|
],
|
2021-01-23 21:33:34 +01:00
|
|
|
]);
|