Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

NetTuts.com:
Using PHP CodeSniffer With WordPress: Installing and Using the WordPress Rules
Jun 21, 2016 @ 18:21:45

The TutsPlus.com site continues their series covering the use of the PHP_CodeSniffer tool with WordPress in this latest post. In this new tutorial they show you how to install and use the WordPress-specific coding "sniffs".

If you're just joining the series, we've been discussing the topic of code smells, how to refactor them, and tools that are available to help us automate some of the monotony that comes with doing so, especially within PHP programming.

[...] If you've made it this far, I assume you're a WordPress developer, and you're interested in getting PHP CodeSniffer configured such that it can sniff out any problems in your code as it relates to the WordPress Coding Standards. That's good! Because in the remainder of this article, that's exactly what we're going to cover.

The tutorial helps you install the WordPress sniffs and how to add them to the standards supported by your local phpcs installation. The command to execute them against your WordPress plugin is included as well as example output and how to refactor those issues away.

tagged: phpcodesniffer smells tutorial wordpress install setup

Link: http://code.tutsplus.com/tutorials/using-php-codesniffer-with-wordpress-installing-and-using-the-wordpress-rules--cms-26443


Trending Topics: