chore: move php-cs-fixer config into tools
- relocate .php-cs-fixer.dist.php to tools/php-cs-fixer/.php-cs-fixer.dist.php - update composer scripts, docs, quality gates, and style skill references - keep finder scope stable via project-root resolution - fix pre-existing unused imports reported by php-cs-fixer
This commit is contained in:
21
tools/php-cs-fixer/.php-cs-fixer.dist.php
Normal file
21
tools/php-cs-fixer/.php-cs-fixer.dist.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
$projectRoot = dirname(__DIR__, 2);
|
||||
|
||||
$finder = PhpCsFixer\Finder::create()
|
||||
->in([
|
||||
$projectRoot . '/config',
|
||||
$projectRoot . '/lib',
|
||||
$projectRoot . '/pages',
|
||||
$projectRoot . '/tests',
|
||||
])
|
||||
->name('*.php');
|
||||
|
||||
return (new PhpCsFixer\Config())
|
||||
->setRiskyAllowed(false)
|
||||
->setRules([
|
||||
'@PSR12' => true,
|
||||
'ordered_imports' => ['sort_algorithm' => 'alpha'],
|
||||
'no_unused_imports' => true,
|
||||
])
|
||||
->setFinder($finder);
|
||||
Reference in New Issue
Block a user