Пример #1
0
 /**
  * @param  PHPUnit_Util_Metrics_Function $metrics
  * @param  DOMElement                    $element
  */
 protected function processFunctionOrMethod($metrics, DOMElement $element)
 {
     $element->setAttribute('name', $metrics->getFunction()->getName());
     $element->setAttribute('loc', $metrics->getLoc());
     $element->setAttribute('locExecutable', $metrics->getLocExecutable());
     $element->setAttribute('locExecuted', $metrics->getLocExecuted());
     $element->setAttribute('coverage', sprintf('%F', $metrics->getCoverage()));
     $element->setAttribute('ccn', $metrics->getCCN());
     $element->setAttribute('crap', sprintf('%F', $metrics->getCrapIndex()));
     $element->setAttribute('npath', $metrics->getNPath());
     $element->setAttribute('parameters', $metrics->getParameters());
 }