Great! This post is for you. There are other ways to use coding standard and clean code is one of them.
There are some checkers in coding standard world, that don't check spaces, tabs, commas nor brackets. They actually do code-review for you.
I use a set of 4 checkers to check open-source packages to help them keeping their code clean.
In Sylius they removed 500 lines of unused code just few days ago.
Among others it removed dead constructor dependencies.
It will not only make your code cleaner, but also can speed up you container build as a side effect.
# easy-coding-standard.neon checkers: # use short array  PhpCsFixer\Fixer\ArrayNotation\ArraySyntaxFixer: syntax: short # drop dead code - SlevomatCodingStandard\Sniffs\Classes\UnusedPrivateElementsSniff # drop dead use namespaces - PhpCsFixer\Fixer\Import\NoUnusedImportsFixer # and sort them A → Z - PhpCsFixer\Fixer\Import\OrderedImportsFixer
composer require --dev symplify/easy-coding-standard
Add checkers to
Check your code
vendor/bin/ecs check src
Fix the code
vendor/bin/ecs check src --fix
Do you want more on this topic? You might like these related posts: How PHP Coding Standard Tools Actually Work, 5 Useful Rules From Symplify Coding Standard