NostalgiaCore/.php-cs-fixer.php
yefengeeeeeeeeeee 71e14456d6
Refactor PHP CS Fixer configuration
Removed unnecessary rules for indentation and superfluous PHPDoc tags.
2026-04-04 17:53:31 +08:00

28 lines
713 B
PHP

<?php
$finder = PhpCsFixer\Finder::create()
->in(__DIR__ . '/src');
return (new PhpCsFixer\Config)
->setRules([
'array_indentation' => true,
'array_syntax' => [
'syntax' => 'short'
],
'blank_line_after_namespace' => true,
'blank_line_after_opening_tag' => true,
'cast_spaces' => [
'space' => 'single'
],
'elseif' => true,
'no_closing_tag' => true,
'no_empty_phpdoc' => true,
'no_trailing_whitespace' => true,
'no_trailing_whitespace_in_comment' => true,
'no_whitespace_in_blank_line' => true,
'unary_operator_spaces' => true
])
->setFinder($finder)
->setIndent("\t")
->setLineEnding("\n")
->setParallelConfig(PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect());