As a Magento developer you are dealing with a complex code-base that you have to navigate through. That is why it is useful to have an IDE (Integrated Development Environment) that helps you write your code and ensure its quality. Perhaps one of the most famous IDE for PHP developers is PHPStorm.
Apply PSR1/PSR2 Standard to your code⌘ + , Code Style -> PHP -> Set from… Configure PHP Codesniffer (phpcs), PHP Mess detector (phpms) and PHP CS Fixer⌘ +, Language & Framework -> PHP -> Quality tools -> PHP CodeSniffer -> …