format/configured/php
A formatter is configured
Implements format/configured for php.
| Severity | warning |
| Tiers | 1, 2 |
| Stacks | php |
| Scope | each |
| Kind | outcome |
| Source | library v0.6.0 |
| Selected by | fleetlint-recommended@v0.6.0 |
Requirement
PHP CS Fixer, Pint, PHP_CodeSniffer or Easy Coding Standard is configured in the project or a parent directory, or runs in a hook, the task runner or CI. Another formatter is added with accept:.
Why
Without one formatter every editor reformats differently and diffs fill with whitespace churn that hides the real change.
Fix
Add .php-cs-fixer.dist.php and friendsofphp/php-cs-fixer in require-dev (fleetlint fix --apply does both).
Agent instruction: Add .php-cs-fixer.dist.php from the template, require friendsofphp/php-cs-fixer in require-dev, and run it with –dry-run in a hook; reformat in a separate commit.
fleetlint fix can apply this rule’s fix automatically (2 action(s)).
A finding of this rule points at .php-cs-fixer.dist.php.
Sources
- https://fleetlint.org/baseline/#static-analysis (convention)
- https://www.php-fig.org/per/coding-style/ (style-guide)
- https://cs.symfony.com/ (spec)
- https://fleetlint.org/stacks/#php
Generated by fleetlint docs from catalog v0.6.0.