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

Theo Tzaferis:
Let CodeSniffer inspect your code in PhpStorm
Sep 15, 2016 @ 10:56:32

In a quick new post to his site Theo Tzaferis shows you how to set up PHPStorm and PHP_CodeSniffer to perform automatic inspection of your PHP code's syntax.

Some time ago I wrote an article on how to format your code automatically in PhpStorm to be conform the PSR standards. In this article I want to show you how you can enable inspections in PhpStorm which throws a warning if you have code which is not PSR, e.g.
  • Whitespace at the end of line
  • No newline at the end of file
  • No newline between namespace and use statements
  • etc…
This is pretty easy. We will use squizlabs/PHP_CodeSniffer from Github.

I’m doing this on an Ubuntu machine, but it should work the same in OS X (no idea about Windows).

He then provides the (*nix-centric) instructions on getting the two tools up and playing happily together. Fortunately PHPStorm comes with handy built-in support for PHP_CodeSniffer, basically only requiring you to install phpcs and point it to the right location. The rest is handled by the IDE when you enable the automatic evaluation.

tagged: phpstorm codesniffer tutorial setup configure automatic inspection

Link: http://tzfrs.de/2016/09/let-codesniffer-inspect-your-code-in-phpstorm/

Zend Developer Zone:
Episode 39: "Continuous Inspection and Integration of PHP Projects"
Feb 23, 2011 @ 10:47:50

On the Zend Developer Zone Kevin Schroeder has published the latest episode of the ZendCon Sessions series of podcasts (as recorded at the 2010 Zend/PHP Conference). The episode is Sebastian Bergmann's talk on continuous inspection and integration in PHP projects.

The ZendCon Sessions are live recordings of sessions that have been given at previous Zend Conferences. Combined with the slides, they can be the next best thing to having attended the conference itself. [...] This episode of The ZendCon Sessions was recorded live at ZendCon 2010 in Santa Clara, CA and features Sebastian Bergmann giving his talk: "Continuous Inspection and Integration of PHP Projects"

You can either listen via the in-page player or by downloading the mp3. His slides have also been posted to Slideshare so you can follow along.

tagged: zendcon10 podcast session continuous inspection integration project sebastianbergmann

Link: