2017-02-21 20:11:59 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
$finder = new PhpCsFixer\Finder();
|
2017-12-30 19:11:40 +01:00
|
|
|
$config = new PhpCsFixer\Config('json-schema');
|
2017-02-21 20:11:59 +01:00
|
|
|
$finder->in(__DIR__);
|
|
|
|
|
|
|
|
/* Based on ^2.1 of php-cs-fixer */
|
|
|
|
$config
|
2024-08-27 09:30:55 +02:00
|
|
|
->setRules([
|
2017-02-21 20:11:59 +01:00
|
|
|
// default
|
|
|
|
'@PSR2' => true,
|
|
|
|
'@Symfony' => true,
|
|
|
|
// additionally
|
2024-08-27 09:30:55 +02:00
|
|
|
'array_syntax' => ['syntax' => 'short'],
|
2017-02-21 20:11:59 +01:00
|
|
|
'binary_operator_spaces' => false,
|
2024-08-27 09:30:55 +02:00
|
|
|
'concat_space' => ['spacing' => 'one'],
|
2022-04-19 09:53:23 +02:00
|
|
|
'increment_style' => false,
|
|
|
|
'no_superfluous_phpdoc_tags' => false,
|
2017-02-21 20:11:59 +01:00
|
|
|
'no_useless_else' => true,
|
|
|
|
'no_useless_return' => true,
|
|
|
|
'ordered_imports' => true,
|
|
|
|
'phpdoc_no_package' => false,
|
|
|
|
'phpdoc_order' => true,
|
|
|
|
'phpdoc_summary' => false,
|
2024-08-27 09:30:55 +02:00
|
|
|
'phpdoc_types_order' => ['null_adjustment' => 'none', 'sort_algorithm' => 'none'],
|
2017-02-21 20:11:59 +01:00
|
|
|
'simplified_null_return' => false,
|
2021-07-21 17:12:22 +02:00
|
|
|
'single_line_throw' => false,
|
|
|
|
'trailing_comma_in_multiline' => false,
|
2019-06-03 12:06:49 +01:00
|
|
|
'yoda_style' => false,
|
2024-08-27 09:30:55 +02:00
|
|
|
])
|
2017-02-21 20:11:59 +01:00
|
|
|
->setFinder($finder)
|
|
|
|
;
|
|
|
|
|
|
|
|
return $config;
|