2021-09-15 14:07:26 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
$finder = PhpCsFixer\Finder::create()
|
|
|
|
->in(__DIR__)
|
2022-08-11 10:43:16 +02:00
|
|
|
->notPath('application/configs/conf.php')
|
2021-09-15 14:07:26 +02:00
|
|
|
->exclude('application/models/airtime/map')
|
|
|
|
->exclude('application/models/airtime/om');
|
|
|
|
|
2022-09-12 14:09:01 +02:00
|
|
|
|
|
|
|
$extra_rules = [
|
|
|
|
'phpdoc_order' => false,
|
|
|
|
];
|
|
|
|
|
|
|
|
if (version_compare(PhpCsFixer\Console\Application::VERSION, '3.11.0') >= 0) {
|
|
|
|
$extra_rules['phpdoc_order'] = ['order' => ['param', 'return', 'throws']];
|
|
|
|
}
|
|
|
|
|
2021-09-15 14:07:26 +02:00
|
|
|
$config = new PhpCsFixer\Config();
|
2022-09-12 14:09:01 +02:00
|
|
|
return $config->setRules(array_merge(
|
|
|
|
[
|
|
|
|
'@PhpCsFixer' => true,
|
|
|
|
'concat_space' => ['spacing' => 'one'],
|
|
|
|
'multiline_whitespace_before_semicolons' => ['strategy' => 'no_multi_line'],
|
|
|
|
'ordered_class_elements' => false,
|
|
|
|
'yoda_style' => false,
|
|
|
|
],
|
|
|
|
$extra_rules
|
|
|
|
))
|
2021-09-15 14:07:26 +02:00
|
|
|
->setFinder($finder);
|