Kahlan\Reporter\Coverage\Metrics::get PHP Method

get() public method

Gets the metrics from a name.
public get ( string $name = null ) : object
$name string The name reference of the metrics.
return object The metrics instance.
    public function get($name = null)
    {
        $parts = $this->_parseName($name);
        $child = $this;
        foreach ($parts as $part) {
            list($name, $type) = $part;
            if (!isset($child->_children[$name])) {
                return;
            }
            $child = $child->_children[$name];
        }
        return $child;
    }