A more recent tool to use I'd suggest using phpcsfixer with one of the default coding standards - PSR-12/PER-Coding-style or @Symfony. Extending PHP_CodeSniffer by Raphael Stolt shows how to quite easily add to a tool that will report what parts of your PHP source needs a clean-up, from the built in 'sniffs' for coding …
Read More