Linter is a tool that helps us find code smells, potential bugs, memory leaks, and convention-lise our code to higher standards.
For enhancing and refactoring the code using a PHP linter, follow the following steps:
-
Go to Preferences -> Plugins, and search 'Php Inspections' plugin.
-
Install 'Php Inspections' from either your idea or from the official linter website https://plugins.jetbrains.com/plugin/7622-php-inspections-ea-extended-
-
Start the linter by right-clicking on the root folder and choosing Analyze -> Inspect Code -> Whole Project -> Ok.
-
Begin betterment of the code.
IntelliJ / PHPStorm ideas.