Become a Better Developer with PHP Inspections (EA Extended)

PHPStorm is an amazing IDE. It's not perfect, but I wouldn't want to write PHP any other way. Aside from having a fairly awesome selection of tools and functionality right 'out of the box', there are also some amazing plugins.

We've covered one such plugin that is absolutely essential (in my opinion) if you are writing Symfony code - that's the creatively named Symfony plugin.

However, whether you are using Symfony, Laravel, Zend Expressive, Slim (hey, this list is ever expanding), WordPress, or Vanilla PHP, there is one plugin that you absolutely must have (in my humble opinion):

PHP Inspections EA Extended.

Now, if I'm honest, I have no idea what the 'EA' part of EA Extended stands for - maybe Extremely Awesome.

Essentially what this plugin gives you is static code analysis - without having to add another dependency to your composer.json file. Now, actually you should use this in conjunction with a static code analyzer as part of your continuous integration pipeline, but that's outside the scope of this video.

In layman's terms that means you have the benefit of your computer reading / inspecting your code - in real time - offering a variety of possible improvements in numerous categories:

PHP Inspections EA Extended inspection options

What's most interesting to me is that even if you're extremely careful and diligent with your coding, docblocking, and use of modern practices, I would bet this plugin will find something you missed. It really is that good. My personal favourite is how it finds possible exceptions that may be thrown in code you're calling from base classes.

A really nice extra here is that PHP Inspections EA Extended will only suggest code that is correct for your chosen version of PHP. For example, if you were to be using PHP 5.6 then you wouldn't see suggestions that only make sense if you're using PHP 7.x. This sounds obvious from a usability perspective, but as developers ourselves, I'm sure we can appreciate the extra effort "little things" like this take to code, and support.

Honestly theres just a ton of benefits to using this plugin and I cannot recommend it highly enough.