src/Reporter/Coverage/Metrics.php
protected function _parseName($name)
    {
        $result = [];
        $parts = preg_split('~([^\\\]*\\\?)~', $name, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);

        $last = array_pop($parts);

        if (!$last) {
            return [];
        }

        foreach ($parts as $name) {
            $result[] = [$name, 'namespace'];
        }

        if (strpos($last, '::') !== false) {
            list($name, $subname) = explode('::', $last, 2);
            $result[] = [$name, 'class'];
            $result[] = [$subname, 'method'];
        } elseif (preg_match('~\(\)$~', $last)) {
            $result[] = [$last, 'function'];
        } else {
            $result[] = [$last, substr($last, -1) === '\\' ? 'namespace' : 'class'];
        }
        return $result;
    }
protected function _parseName($name)
    {
        $result = [];
        $parts = preg_split('~([^\\\]*\\\?)~', $name, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);

        $last = array_pop($parts);

        if (!$last) {
            return [];
        }

        foreach ($parts as $name) {
            $result[] = [$name, 'namespace'];
        }

        if (strpos($last, '::') !== false) {
            list($name, $subname) = explode('::', $last, 2);
            $result[] = [$name, 'class'];
            $result[] = [$subname, 'method'];
        } elseif (preg_match('~\(\)$~', $last)) {
            $result[] = [$last, 'function'];
        } else {
            $result[] = [$last, substr($last, -1) === '\\' ? 'namespace' : 'class'];
        }
        return $result;
    }
protected function _parseName ( $ name ) { $ result = [ ] ; $ parts = preg_split ( '~([^\\\]*\\\?)~' , $ name , - 1 , PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY ) ; $ last = array_pop ( $ parts ) ; if ( ! $ last ) { return [ ] ; } foreach ( $ parts as $ name ) { $ result [ ] = [ $ name , 'namespace' ] ; } if ( strpos ( $ last , '::' ) !== false ) { list ( $ name , $ subname ) = explode ( '::' , $ last , 2 ) ; $ result [ ] = [ $ name , 'class' ] ; $ result [ ] = [ $ subname , 'method' ] ; } elseif ( preg_match ( '~\(\)$~' , $ last ) ) { $ result [ ] = [ $ last , 'function' ] ; } else { $ result [ ] = [ $ last , substr ( $ last , - 1 ) === '\\' ? 'namespace' : 'class' ] ; } return $ result ; }
Gets meta info of a metrics from a name reference..

@param  string $name The name reference of the metrics.
@return array        The parsed name.
Gets meta info of a metrics from a name reference ..