mailwal

Use automation to give immediate feedback

Joel Clermont
Logo

Yesterday, I shared a tip about using PHPStorm to review a pull request because the more powerful syntax highlighting could help you catch an unused namespace import.

Have an automated tool do that for you!

Catching an unused import during the pull request process is great, but even better would be a way for a developer to catch it before they submitted the pull request, saving you a little bit of mental energy as you're reviewing it.

One of my favorite tools for this is PHP CodeSniffer. This automated tool runs extremely quickly and not only enforces a typical coding standard, but also catches things like unused imports.

Between the built-in "code sniffs" and the vast library of additional sniffs from the slevomat coding standard, you're likely to find a pre-built way to enforce things that you're manually enforcing now through manual review.

Tools never get tired, and they never miss an unused import - even if it is a pull request with 200 changed files. Put those tools to work!

Here to help,

Joel


You received this email because you signed up at masteringlaravel.io. Thanks!

Or click here to update your email address.