2017-06-04 00:05:31 +02:00
|
|
|
<?php
|
|
|
|
|
2017-08-22 05:06:52 +02:00
|
|
|
$finder = PhpCsFixer\Finder::create()
|
|
|
|
->in([
|
|
|
|
'app',
|
|
|
|
'bootstrap',
|
|
|
|
'config',
|
|
|
|
'database',
|
|
|
|
'resources/lang',
|
|
|
|
'routes',
|
|
|
|
'tests',
|
|
|
|
]);
|
2017-06-04 00:05:31 +02:00
|
|
|
|
2017-08-22 05:06:52 +02:00
|
|
|
return PhpCsFixer\Config::create()
|
|
|
|
->setRules([
|
|
|
|
'@Symfony' => true,
|
|
|
|
'@PSR1' => true,
|
|
|
|
'@PSR2' => true,
|
|
|
|
'align_multiline_comment' => ['comment_type' => 'phpdocs_like'],
|
|
|
|
'array_syntax' => ['syntax' => 'short'],
|
|
|
|
'blank_line_before_return' => true,
|
|
|
|
'blank_line_before_statement' => false,
|
|
|
|
'combine_consecutive_unsets' => true,
|
|
|
|
'concat_space' => ['spacing' => 'one'],
|
|
|
|
'declare_equal_normalize' => ['space' => 'single'],
|
|
|
|
'heredoc_to_nowdoc' => true,
|
2017-11-05 20:33:42 +01:00
|
|
|
'increment_style' => ['style' => 'post'],
|
2017-08-22 05:06:52 +02:00
|
|
|
'linebreak_after_opening_tag' => true,
|
2017-08-31 04:11:14 +02:00
|
|
|
'method_argument_space' => [
|
|
|
|
'ensure_fully_multiline' => false,
|
|
|
|
'keep_multiple_spaces_after_comma' => false,
|
|
|
|
],
|
2017-08-22 05:06:52 +02:00
|
|
|
'new_with_braces' => false,
|
|
|
|
'no_alias_functions' => true,
|
|
|
|
'no_multiline_whitespace_before_semicolons' => true,
|
2020-04-03 21:58:20 +02:00
|
|
|
'no_superfluous_phpdoc_tags' => false,
|
2017-08-22 05:06:52 +02:00
|
|
|
'no_unreachable_default_argument_value' => true,
|
|
|
|
'no_useless_return' => true,
|
|
|
|
'not_operator_with_successor_space' => true,
|
2017-09-05 02:07:00 +02:00
|
|
|
'ordered_imports' => [
|
|
|
|
'sortAlgorithm' => 'length',
|
|
|
|
],
|
2019-09-06 06:32:57 +02:00
|
|
|
'phpdoc_align' => false,
|
2017-08-22 05:06:52 +02:00
|
|
|
'phpdoc_separation' => false,
|
|
|
|
'protected_to_private' => false,
|
|
|
|
'psr0' => ['dir' => 'app'],
|
|
|
|
'psr4' => true,
|
|
|
|
'random_api_migration' => true,
|
2020-04-10 07:35:38 +02:00
|
|
|
'single_line_throw' => false,
|
2020-04-12 00:35:32 +02:00
|
|
|
'single_trait_insert_per_statement' => false,
|
2017-08-22 05:06:52 +02:00
|
|
|
'standardize_not_equals' => 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
|
|
|
],
|
2017-08-22 05:06:52 +02:00
|
|
|
])->setRiskyAllowed(true)->setFinder($finder);
|