News Feed
Sections




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

NetTuts.com:
PSR-Duh!
April 12, 2013 @ 10:46:26

On NetTuts.com today there's a post that talks about applying the PSR formatting to your application's code. If you haven't already read their introduction to the PSRs, it's highly suggested.

In a previous lesson here on Nettuts+, you learn about PSR; however, that article didn't detail the process of integrating that coding style into your projects. Let's fix that!

They briefly recap the main two PSRs (PSR-1 and PSR-2, but no mention of PSR-3 the logging interface) and show code examples of them being applied. They also point to the PHP_CodeSniffer tool that you can use to keep your code in the correct structure. Instructions are included to install it specifically for the Sublime Text 2 editor via package control. It's just a command-line tool, though, so it could be integrated with just about any other editor/IDE out there too.

0 comments voice your opinion now!
psr psr1 psr2 apply autoload formatting phpcodesniffer

Link: http://net.tutsplus.com/tutorials/tools-and-tips/psr-duh

blog comments powered by Disqus

Similar Posts

SaniSoft Blog: Code sniffs for CakePHP and then some more

SitePoint PHP Blog: How to Use PHP Namespaces (Parts 2 &3)

Chris Hartjes: Standards, Soapboxes, and Shamans

Brandon Savage's Blog: The Adventures Of Merging Propel With Zend Framework

PHP Town Hall Podcast: Episode #6 - PSR-X and the Mexican Standoff


Community Events





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


series opinion podcast unittest introduction threedevsandamaybe testing developer refactor framework configure interview laravel code language community symfony2 list release install

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