SebastianBergmann\PHPCPD\CodeClone::getFiles PHP Method

getFiles() public method

Get files with clone
public getFiles ( ) : SebastianBergmann\PHPCPD\CodeCloneFile[]
return SebastianBergmann\PHPCPD\CodeCloneFile[]
    public function getFiles()
    {
        return $this->files;
    }

Usage Example

Example #1
0
 /**
  * Adds a clone to the map.
  *
  * @param CodeClone $clone
  */
 public function addClone(CodeClone $clone)
 {
     $id = $clone->getId();
     if (!isset($this->clonesById[$id])) {
         $this->clones[] = $clone;
         $this->clonesById[$id] = $clone;
     } else {
         $existClone = $this->clonesById[$id];
         foreach ($clone->getFiles() as $file) {
             $existClone->addFile($file);
         }
     }
     $this->numDuplicateLines += $clone->getSize();
 }