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([
|
2023-04-09 18:28:30 +08:00
|
|
|
'@PhpCsFixer' => true,
|
|
|
|
'single_line_comment_style' => ['comment_types' => ['hash']],
|
|
|
|
'general_phpdoc_annotation_remove' => ['annotations' => ['author'], 'case_sensitive' => false],
|
2022-11-01 16:15:17 +08:00
|
|
|
'global_namespace_import' => [
|
|
|
|
'import_classes' => true,
|
|
|
|
'import_constants' => true,
|
2023-04-09 18:28:30 +08:00
|
|
|
'import_functions' => true,
|
2021-07-09 23:05:02 +08:00
|
|
|
],
|
2019-09-08 22:13:53 +08:00
|
|
|
])
|
|
|
|
->setFinder($finder);
|