lib/Model/ResultCollection.php
public function getMetric($class, $metric)
    {
        $metrics = $this->getResult($class)->getMetrics();

        if (!isset($metrics[$metric])) {
            throw new \InvalidArgumentException(sprintf(
                'Unknown metric "%s" for result class "%s". Available metrics: "%s"',
                $metric, $class, implode('", "', array_keys($metrics))
            ));
        }

        return $metrics[$metric];
    }
public function getMetric($class, $metric)
    {
        $metrics = $this->getResult($class)->getMetrics();

        if (!isset($metrics[$metric])) {
            throw new \InvalidArgumentException(sprintf(
                'Unknown metric "%s" for result class "%s". Available metrics: "%s"',
                $metric, $class, implode('", "', array_keys($metrics))
            ));
        }

        return $metrics[$metric];
    }
public function getMetric ( $ class , $ metric ) { $ metrics = $ this -> getResult ( $ class ) -> getMetrics ( ) ; if ( ! isset ( $ metrics [ $ metric ] ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Unknown metric "%s" for result class "%s". Available metrics: "%s"' , $ metric , $ class , implode ( '", "' , array_keys ( $ metrics ) ) ) ) ; } return $ metrics [ $ metric ] ; }
Return the named metric for the given result class.

@param string $class
@param string $metric

@throws \InvalidArgumentException

@return mixed
Return the named metric for the given result class .