<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Tue, 21 May 2013 21:57:02 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Christian Weiske: PHP_CodeSniffer: notify-send report]]></title>
      <guid>http://www.phpdeveloper.org/news/18362</guid>
      <link>http://www.phpdeveloper.org/news/18362</link>
      <description><![CDATA[<p>
In a new post to his site <i>Christian Weiske</i> shares an update he contributed to the PHP_CodeSniffer functionality to make working with and checking the validity of local PHP code easier - a <a href="http://cweiske.de/tagebuch/phpcs-notify-send.htm">notifier for PHP_CodeSniffer</a> using the "notify-send" commonly installed in most Linux distributions.
</p>
<blockquote>
I use emacs as IDE, and wanted to have direct feedback about the validity of my .php files when writing them. The most easy way was to add a save hook that runs <a href="http://pear.php.net/package/PHP_CodeSniffer/">PHP_CodeSniffer</a> - but the results should be displayed in a nice, unobtrusive way. phpcs has <a href="http://pear.php.net/manual/en/package.php.php-codesniffer.reporting.php">multiple reporting modes</a> - xml, checkstyle, csv etc. - but nothing for the desktop. I thought that notify-send would be the right fit since it is able to display pretty popup messages without getting in the way.
</blockquote>
<p>
He also includes the details on his original objective - including it in a "on save" hook as well as providing it in a keystroke shortcut, making checking his code even easier.
</p>]]></description>
      <pubDate>Wed, 15 Aug 2012 09:54:07 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Project: CodeSniffer for PSR's (PSR-0, PSR-1 & PSR-2)]]></title>
      <guid>http://www.phpdeveloper.org/news/18071</guid>
      <link>http://www.phpdeveloper.org/news/18071</link>
      <description><![CDATA[<p>
<i>Klaus Silveira</i> has created a set of PHP_CodeSniffer rules that can be used to <a href="https://github.com/klaussilveira/phpcs-psr">test your code for the recently approved PSR-1 & PSR-2 standards</a>.
</p>
<blockquote>
This is a PHP_CodeSniffer sniff to check against the PHP Standard Resolutions: <a href="https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md">PSR-0</a>, <a href="https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md">PSR-1</a> and <a href="https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md">PSR-2</a>. Those standards were approved by the <a href="https://github.com/php-fig/fig-standards">PHP Framework Interoperability Group</a>. You can read more about the PHP FIG and the PSR's on this <a href="http://paul-m-jones.com/archives/2420">excellent article</a> by Paul Jones.
</blockquote>
<p>
<a href="https://github.com/klaussilveira/phpcs-psr">The github repository</a> also provides an overview of the standards themselves and how to get these sniffs installed.
</p>]]></description>
      <pubDate>Sat, 09 Jun 2012 11:17:50 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Lorna Mitchell's Blog: PHP Static Analysis Tool Usage]]></title>
      <guid>http://www.phpdeveloper.org/news/16668</guid>
      <link>http://www.phpdeveloper.org/news/16668</link>
      <description><![CDATA[<p>
In an informal poll <i>Lorna Mitchell</i> recently asked fellow developers to weigh in on what static analysis tool they used on their code. She's <a href="http://www.lornajane.net/posts/2011/PHP-Static-Analysis-Tool-Usage">posted the results</a> to her blog today with one of the tools being a clear winner.
</p>
<blockquote>
My interest was mostly because I'm working on a book chapter which includes some static analysis content, and there are a couple of these tools that I include in my own builds, but I don't do much with the output of them. However I didn't want to drop anything from the chapter if it was actually a valuable tool and I was just missing the point - pretty much all the tools got a good number of votes though, so I'll be covering all of the [options].
</blockquote>
<p>
According to <a href="http://www.flickr.com/photos/lornajane/5993620876/">her results</a>, the most used tool by developers is the <a href="http://pear.php.net/package/php_codesniffer">PHP_CodeSniffer</a> with the <a href="http://phpmd.org/">PHP Mess Detector</a> and <a href="https://github.com/sebastianbergmann/phpcpd">PHP Copy & Paste Detector</a> tied for second place.
</p>]]></description>
      <pubDate>Wed, 03 Aug 2011 10:50:22 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Christian Weiske's Blog: How to integrate PHP_CodeSniffer with Git repositories?]]></title>
      <guid>http://www.phpdeveloper.org/news/16393</guid>
      <link>http://www.phpdeveloper.org/news/16393</link>
      <description><![CDATA[<p>
<i>Christian Weiske</i> has a problem he hopes you can help with - he's trying to get the <a href="http://pear.php.net/package/PHP_CodeSniffer">PHP_Codesniffer</a> tool integrated into his git workflow (well, the workflow of his team) as an automatic process that runs on commit. Unfortunately he's <a href="http://cweiske.de/tagebuch/codesniffer-git-how.htm">having some issues</a>.
</p>
<blockquote>
At work, we used a SVN server and enforced our project coding standard with a pre-commit hook on the server that ran PHP_CodeSniffer. Whenever a developer tried to commit some code that does not match the standard, he got it rejected. [...] The only way to enforce the standard is a pre-receive hook on our central Git repository server that all devs push to. Just installing the SVN hook on it isn't the solution, though.
</blockquote>
<p>
Because of how git handles commits (possibly multiple in one push) the usual methods won't work. Other tricky things like file renaming and allowing for legacy code check-ins are also needed. He's <a href="http://stackoverflow.com/questions/6120331/git-pre-receive-hook-with-php-codesniffer">posted the question on StackOverflow</a> too, but no one's come up with a good answer yet (at the time of this post).
</p>]]></description>
      <pubDate>Fri, 27 May 2011 11:16:48 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DZone.com: PHP Tool Integration (PHPsrc)]]></title>
      <guid>http://www.phpdeveloper.org/news/16378</guid>
      <link>http://www.phpdeveloper.org/news/16378</link>
      <description><![CDATA[<p>
On the PHP on Windows section of DZone.com, <i>Eric Hogue</i> <a href="http://css.dzone.com/news/php-tool-integration-phpsrc">looks at the PHPsrc extension</a> for Eclipse - a handy tool that lets you run some of the common PHP QA tools right from the IDE.
</p>
<blockquote>
<a href="http://www.phpsrc.org/">PHPsrc</a> is a plugin that allow you to run PHP_CodeSniffer, PHPUnit, PHP Depend and PHP Copy/Paste Detector directly in Eclipse. The site also says that more tools should come. As you work, you will see any transgression you make. That will save you from breaking the build, but it also makes it easier to fix the problem. After all, you just wrote the faulty lines of code.
</blockquote>
<p>
He walks you through the install of the plugin and shows you how to set things up to point to the executables on your development environment (complete with some screenshots). There's even an <a href="http://erichogue.ca/wp-content/uploads/2011/04/PHPsrcResults.png">example of the output</a> for a particularly offensive (standards-wise, of course) piece of code.
</p>]]></description>
      <pubDate>Tue, 24 May 2011 12:05:15 -0500</pubDate>
    </item>
  </channel>
</rss>
