2019-09-08 22:13:53 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
$finder = PhpCsFixer\Finder::create()
|
|
|
|
->exclude('tests')
|
2021-01-10 16:09:42 +08:00
|
|
|
->exclude('vendor')
|
|
|
|
->in(__DIR__);
|
2019-09-08 22:13:53 +08:00
|
|
|
|
2021-06-13 23:57:39 +08:00
|
|
|
return (new PhpCsFixer\Config())
|
2019-09-08 22:13:53 +08:00
|
|
|
->setUsingCache(false)
|
|
|
|
->setRules([
|
|
|
|
'@Symfony' => true,
|
|
|
|
'class_attributes_separation' => true,
|
|
|
|
'ordered_class_elements' => true,
|
2019-09-08 22:55:47 +08:00
|
|
|
'ordered_imports' => ['sort_algorithm' => 'alpha'],
|
2019-09-08 22:13:53 +08:00
|
|
|
'line_ending' => true,
|
|
|
|
'single_quote' => true,
|
|
|
|
'array_syntax' => ['syntax' => 'short'],
|
2022-11-01 16:15:17 +08:00
|
|
|
'global_namespace_import' => [
|
|
|
|
'import_classes' => true,
|
|
|
|
'import_constants' => true,
|
|
|
|
'import_functions' => null,
|
|
|
|
],
|
2021-07-09 23:05:02 +08:00
|
|
|
'general_phpdoc_annotation_remove' => [
|
|
|
|
'annotations' => [
|
|
|
|
'author'
|
|
|
|
],
|
|
|
|
],
|
2019-09-08 22:13:53 +08:00
|
|
|
])
|
|
|
|
->setFinder($finder);
|