SebastianBergmann\PHPCPD\CodeCloneMap::getPercentage PHP Method

getPercentage() public method

Returns the percentage of duplicated code lines in the project.
public getPercentage ( ) : string
return string
    public function getPercentage()
    {
        if ($this->numLines > 0) {
            $percent = $this->numDuplicateLines / $this->numLines * 100;
        } else {
            $percent = 100;
        }
        return sprintf('%01.2F%%', $percent);
    }