<?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>Thu, 23 May 2013 06:01:55 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Sameer Borate's Blog: Detecting duplicate code in PHP files]]></title>
      <guid>http://www.phpdeveloper.org/news/12300</guid>
      <link>http://www.phpdeveloper.org/news/12300</link>
      <description><![CDATA[<p>
On his blog today <i>Sameer</i> looks at <a href="http://www.codediesel.com/tools/detecting-duplicate-code-in-php-files/">a method for finding duplicate code</a> in your applications with the help of <a href="http://github.com/sebastianbergmann/phpcpd/tree/master">PHPCPD</a>.
</p>
<blockquote>
Duplicated code in projects is a frequent thing and also the one ripe for factoring out in a new class or function. Cut/Paste coding is a common development practice among programmers, a lot of which can lead to code size increase and maintenance nightmares. <a href="http://github.com/sebastianbergmann/phpcpd/tree/master">PHPCPD</a> (php copy paste detector) is a PEAR tool that makes it easier to detect duplicate code in php projects. Below is a short tutorial on the PHPCPD package.
</blockquote>
<p>
You can either install the tool via a PEAR channel or directly from the github site. Once its downloaded and extracted you can immediately run it on the subdirectory of your choice. He also includes a more extended example - a search on a minimum of 5 lines of 70 tokens found to trip the filter in finding cloned functionality.
</p>]]></description>
      <pubDate>Wed, 08 Apr 2009 11:16:17 -0500</pubDate>
    </item>
  </channel>
</rss>
