<?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>Fri, 24 May 2013 18:15:22 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Andrew Podner: NPATH Complexity Demystified]]></title>
      <guid>http://www.phpdeveloper.org/news/18745</guid>
      <link>http://www.phpdeveloper.org/news/18745</link>
      <description><![CDATA[<p>
In <a href="http://unassumingphp.com/npath-complexity-demystified/">a new post to his site</a> today <i>Andrew Podner</i> takes a look at NPATH and tries to "demystify" some of the concepts around it.
</p>
<blockquote>
"NPATH, which counts the acyclic execution paths through a function, is an objective measure of software complexity related to the ease with which software can be comprehensively tested."[1]  This is the definition from an article written in 1988 by Brian Nejmeh.  As informative as this is, my eyes glazed over half way into it. So what the heck is acyclic execution anyway? 
</blockquote>
<p>
He defines the term in a bit easier to understand language and includes an example function to help illustrate how NPATH is measured. 
</p>
<blockquote>
The goal is to limit your NPATH complexity in a given method down to 200 or less. [...] As with other complexity metrics, this one can be checked with <a href=""http://phpmd.org/">PHP Mess Detector</a> (phpmd).  The importance of staying under the 200 path threshold is realized when you develop tests and start trying to debug.
</blockquote>]]></description>
      <pubDate>Wed, 14 Nov 2012 10:55:57 -0600</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[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>
    <item>
      <title><![CDATA[QaFoo.com Blog: Howto write a Rule for PHPMD]]></title>
      <guid>http://www.phpdeveloper.org/news/16072</guid>
      <link>http://www.phpdeveloper.org/news/16072</link>
      <description><![CDATA[<p>
On the QaFoo blog today <i>Manuel Pichler</i> has written up a guide to help you <a href="http://qafoo.com/blog/019_howto_write_custom_rules_for_phpmd.html">write a custom rule</a> to use with the PHP Mess Detector (PHPMD) as extended from some of the current rules (it's always easier to start from examples).
</p>
<blockquote>
Let us start with some architecture basics behind PHPMD. All rules in PHPMD must at least implement the <a href="https://github.com/phpmd/phpmd/blob/master/src/main/php/PHP/PMD/Rule.php">PHP_PMD_Rule</a> interface. You can also extend the abstract rule base class <a href="https://github.com/phpmd/phpmd/blob/master/src/main/php/PHP/PMD/AbstractRule.php">PHP_PMD_AbstractRule</a> which already provides an implementation of all required infrastructure methods and application logic, so that the only task which is left to you is the implementation of the concrete validation code of your rule. 
</blockquote>
<p>
He walks you through some sample code and talks about some of the common interfaces that are available to your testing. He takes one of them, IFunctionAware, and looks at it specifically, showing how to use it to detect and add violations for the validation. He includes an example of writing a rule based on an existing software metric (in this case, the number of public methods). There's also  bit at the end showing how to write a rule based on the "abstract syntax tree" to be able to check just about anything in the code you're looking to test.
</p>]]></description>
      <pubDate>Mon, 21 Mar 2011 09:16:57 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Manuel Pichler's Blog: Howto create custom rule sets for PHPMD]]></title>
      <guid>http://www.phpdeveloper.org/news/14329</guid>
      <link>http://www.phpdeveloper.org/news/14329</link>
      <description><![CDATA[<p>
If you've been using the <a href="http://phpmd.org/about.html">PHP Mess Detector (PHPMD)</a> to help clean up problem areas in your applications, but have needed more than just the basic rules that it comes with, you're in luck. <i>Manuel Pichler</i> has put together a new post for his blog about <a href="http://manuel-pichler.de/archives/84-Howto-create-custom-rule-sets-for-PHPMD.html">creating custom rules sets</a> for the tool.
</p>
<blockquote>
PHPMD can be seen as an one level down/low level equivalent to <a href="http://pear.php.net/package/PHP_CodeSniffer">PHP_CodeSniffer</a>. It is a simple command line tool that can be used to check your application's source code for possible bugs, suboptimal or overcomplicated code. The current release of <a href="http://phpmd.org/about.html">PHPMD</a> ships with three default rule sets. 
</blockquote>
<p>
The first deals with code size, the second checks for unused variables and the like and the third looks at naming conventions. He shows how to take one of the structures from one of these three and create a new rule. For his example it's a measurement of <a href="http://phpmd.org/rules/codesize.html#cyclomaticcomplexity">cyclomatic complexity</a>. He also shows you how to exclude certain rules that might come in another set so you don't have to completely redefine to use pre-existing rules.
</p>
<p>
The latest release of PHPMD can be pulled from <a href="http://pear.phpmd.org/">pear.phpmd.org</a> or from its <a href="http://github.com/manuelpichler/phpmd">github repository</a>.
</p>]]></description>
      <pubDate>Fri, 09 Apr 2010 13:19:25 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Sebastian Bergmann's Blog: Quality Assurance Tools for PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/12153</guid>
      <link>http://www.phpdeveloper.org/news/12153</link>
      <description><![CDATA[<p>
<i>Sebastian Bergmann</i> has <a href="http://sebastian-bergmann.de/archives/856-Quality-Assurance-Tools-for-PHP.html">a new post</a> that lists a few quality assurance testing tools you can use to ensure that you and your code are safe to make the jump to production.
</p>
<p>
He's <a href="http://www.flickr.com/photos/sebastian_bergmann/3356003644/">laid out a map</a> of the tools that can all interact to create a more robust environment for automatically building and testing your code. Here's his list:
</p>
<ul>
<li><a href="http://pear.php.net/package/PHP_CodeSniffer">PHP_CodeSniffer</a>
<li><a href="http://phpmd.org/">phpmd</a>
<li><a href="http://github.com/sebastianbergmann/phpcpd/">phpcpd</a>
<li><a href="http://pdepend.org/">PHP_Depend</a>
<li><a href="http://www.phpunit.de/">PHPUnit</a>
</ul>
<p>
The results of all of these tools running on your code is then fed into the <a href="http://cruisecontrol.sourceforge.net/">CruiseControl</a> instance and passed off to <a href="http://phpundercontrol.org/">phpUnderControl</a> for final deployment.
</p>]]></description>
      <pubDate>Tue, 17 Mar 2009 12:02:53 -0500</pubDate>
    </item>
  </channel>
</rss>
