<?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, 18 Jun 2013 16:47:53 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Sebastian Bergmann's Blog: CRAP in PHPUnit 3.5]]></title>
      <guid>http://www.phpdeveloper.org/news/13824</guid>
      <link>http://www.phpdeveloper.org/news/13824</link>
      <description><![CDATA[<p>
As <i>Sebastian Bergmann</i> mentions in his <a href="http://sebastian-bergmann.de/archives/877-CRAP-in-PHPUnit-3.5.html">latest post</a>, he's changed up how the code coverage functionality is handled in <a href="http://phpunit.de">PHPUnit</a> so that he can add something new - CRAP.
</p>
<blockquote>
PHP_CodeCoverage is a component that provides collection, processing, and rendering functionality for PHP code coverage information. [...] Having all code that deals with code coverage in a separate component allows for easier development and better testing. The first result of these improved development conditions is a small new feature that I recently implemented, the support for the CRAP metric.
</blockquote>
<p>
Your code's <a href="http://www.crap4j.org/">CRAP</a> (Change Risk Analysis and Predictions) scoring combines the idea of <a href="http://en.wikipedia.org/wiki/Cyclomatic_complexity">cyclomatic complexity</a> and code coverage statistics to try to guess at how difficult any given piece of code would be to maintain. You can <a href="http://sebastian-bergmann.de/uploads/crap.png">see an example here</a> - the lower the number the better.
</p>]]></description>
      <pubDate>Tue, 12 Jan 2010 11:14:03 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Jacob Santos' Blog: What is your C.R.A.P. Index?]]></title>
      <guid>http://www.phpdeveloper.org/news/8406</guid>
      <link>http://www.phpdeveloper.org/news/8406</link>
      <description><![CDATA[<p>
In relation to a <a href="http://www.phpdeveloper.org/news/8388">recent announcement</a> from <i>Sebastian Bergmann</i> about the inclusion of Cyclometic Complexity testing in the upcoming <a href="http://www.phpunit.de">PHPUnit release</a>, <i>Jacob Santos</i> has <a href="http://www.santosj.name/programming/php-related/php/what-is-your-crap-index/">taken a look at its use</a> - find the <a href="http://www.artima.com/weblogs/viewpost.jsp?thread=210575">C.R.A.P.</a> of a process.
</p>
<blockquote>
The Change Risk Analysis and Predictions (CRAP) index is to give some idea how difficult it would be to maintain the code base. It is not to be used in evaluating how "beautiful" the code is.
</blockquote>
<p>
He had to modify things slightly in PHPUnit to get it to work with entire files/functions, but it was still simple to use the testing software to create each file's CRAP index. For his examples, he chose the WordPress code and includes the code he used for the tests - two functions: getCCLevel and getCrapIndex. The results of the report are <a href="http://www.santosj.name/programming/php-related/php/what-is-your-crap-index/">also included</a>.
</p>]]></description>
      <pubDate>Tue, 07 Aug 2007 11:57:00 -0500</pubDate>
    </item>
  </channel>
</rss>
