News Feed
Sections




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

IBuildings techPortal:
Using PHP_CodeSniffer
October 12, 2009 @ 07:58:51

On the IBuildings techPortal site today there's a new article from Lorna Mitchell about the use of the PHP_CodeSniffer PEAR package to run formatting checks on your code.

PHP Code Sniffer (PHPCS) is a package for syntax checking, available from PEAR. It can check code against defined rules covering anything from whitespace through doc comments to variable naming conventions and beyond. In this article we'll look at getting started with PHPCS, using it to syntax check our files, and go further to look at how the rules are create and the standards defined.

She goes through the installation (a simple call with the pear installer) and a few examples of code and the matching output for a few of the syntax formats included with the tool. She also has a section on the structure of some of the rules and looks at the sniff for defining functions for the PEAR standard.

0 comments voice your opinion now!
pear phpcodesniffer tutorial syntax


blog comments powered by Disqus

Similar Posts

Gonzalo Ayuso: Releasing unmanaged resources (a PHP port from C#’s “using” statement)

PHPMaster.com: Proc_Open: Communicate with the Outside World

IBM developerWorks: Understanding the Zend Framework,Part 4: When there is no feed, Zend_HTTP_Client

Matthew Weier O'Phinney: ZF2 Modules Quickstart (Screencast)

Court Ewing's Blog: PHP Integration with Salesforce CRM


Community Events





Don't see your event here?
Let us know!


language composer community api framework threedevsandamaybe conference introduction list configure release interview series unittest podcast opinion laravel version voicesoftheelephpant symfony

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework