PHP Copy-Paste Detector

Posted by user1615069 on Stack Overflow See other posts from Stack Overflow or by user1615069
Published on 2012-09-01T09:15:27Z Indexed on 2012/09/01 9:38 UTC
Read the original article Hit count: 237

Filed under:
|

My problem is that when I run phpcpd command I always get 0% doubled code result, no matter if it's my project, if it's any php module's files, or if it's a file I created to check if phpcpd works...For example when I check the file below it also displays 0%:

phpcpd folder/file.php:

<?php

class Class_Two {

    public function aaa()
    {
        if(2 == 2)
        {
            echo 'ok';
        }
    }   

    public function aaa()
    {
        if(2 == 2)
        {
            echo 'ok';
            echo 'ok';
            echo 'ok';
            echo 'ok';
            echo 'ok';
            echo 'ok';
        }
    }
    public function aaa()
    {
        if(2 == 2)
        {
            echo 'ok';
        }
    }

    public function aaa()
    {
        if(2 == 2)
        {
            echo 'ok';
            echo 'ok';
            echo 'ok';
            echo 'ok';
            echo 'ok';
            echo 'ok';
        }
    }
    public function aaa()
    {
        if(2 == 2)
        {
            echo 'ok';
        }
    }

    public function aaa()
    {
        if(2 == 2)
        {
            echo 'ok';
            echo 'ok';
            echo 'ok';
            echo 'ok';
            echo 'ok';
            echo 'ok';
        }
    }
    public function aaa()
    {
        if(2 == 2)
        {
            echo 'ok';
        }
    }

    public function aaa()
    {
        if(2 == 2)
        {
            echo 'ok';
            echo 'ok';
            echo 'ok';
            echo 'ok';
            echo 'ok';
            echo 'ok';
        }
    }
    public function aaa()
    {
        if(2 == 2)
        {
            echo 'ok';
        }
    }

    public function aaa()
    {
        if(2 == 2)
        {
            echo 'ok';
            echo 'ok';
            echo 'ok';
            echo 'ok';
            echo 'ok';
            echo 'ok';
        }
    }
    public function aaa()
    {
        if(2 == 2)
        {
            echo 'ok';
        }
    }

    public function aaa()
    {
        if(2 == 2)
        {
            echo 'ok';
            echo 'ok';
            echo 'ok';
            echo 'ok';
            echo 'ok';
            echo 'ok';
        }
    }

}

class Class_Two {

    public function aaa()
    {
        if(2 == 2)
        {
            echo 'ok';
        }
    }

    public function aaa()
    {
        if(2 == 2)
        {
            echo 'ok';
        }
    }

}

Any suggestions on why isn't it working properly? Or maybe it is supposed to do some other tasks?

© Stack Overflow or respective owner

Related posts about php

Related posts about pear