Esempio n. 1
0
 /**
  * Run the detection
  *
  * @param  PHPCPD_Detector_Strategy $strategy
  * @param  PHPCPD_CloneMap $oMap
  * @param  string $file
  *
  * @return PHPCPD_Detector_Tokenizer
  */
 public function process(PHPCPD_Detector_Strategy $strategy, PHPCPD_CloneMap $oMap, $file)
 {
     $oDetector = $this->_suffixMapper($file);
     $oDetector->cpd($strategy, $file);
     $oMap->setNumLines($oMap->getNumLines() + $oDetector->getLines());
     return $this;
 }
Esempio n. 2
0
 /**
  * (non-PHPdoc)
  * @see PHPCPD_Clone::__construct($aFile, $aStartLine, $bFile, $bStartLine, $size, $tokens)
  */
 public function addClone($aFile, $aStartLine, $bFile, $bStartLine, $size, $tokens, $label = '')
 {
     $this->_oMap->addClone(new PHPCPD_Clone($aFile, $aStartLine, $bFile, $bStartLine, $size, $tokens));
     return $this;
 }