src/Reflection/ReflectionFile.php
private function fetchContext(int $invocationTID, int $argumentsTID): array
    {
        $class = $operator = '';
        $name = trim($this->getSource($invocationTID, $argumentsTID), '( ');

        //Let's try to fetch all information we need
        if (strpos($name, '->') !== false) {
            $operator = '->';
        } elseif (strpos($name, '::') !== false) {
            $operator = '::';
        }

        if (!empty($operator)) {
            list($class, $name) = explode($operator, $name);

            //We now have to clarify class name
            if (in_array($class, ['self', 'static', '$this'])) {
                $class = $this->activeDeclaration($invocationTID);
            }
        }

        return [$class, $operator, $name];
    }
private function fetchContext(int $invocationTID, int $argumentsTID): array
    {
        $class = $operator = '';
        $name = trim($this->getSource($invocationTID, $argumentsTID), '( ');

        //Let's try to fetch all information we need
        if (strpos($name, '->') !== false) {
            $operator = '->';
        } elseif (strpos($name, '::') !== false) {
            $operator = '::';
        }

        if (!empty($operator)) {
            list($class, $name) = explode($operator, $name);

            //We now have to clarify class name
            if (in_array($class, ['self', 'static', '$this'])) {
                $class = $this->activeDeclaration($invocationTID);
            }
        }

        return [$class, $operator, $name];
    }
private function fetchContext ( int $ invocationTID , int $ argumentsTID ) : array { $ class = $ operator = '' ; $ name = trim ( $ this -> getSource ( $ invocationTID , $ argumentsTID ) , '( ' ) ; //Let's try to fetch all information we need if ( strpos ( $ name , '->' ) !== false ) { $ operator = '->' ; } elseif ( strpos ( $ name , '::' ) !== false ) { $ operator = '::' ; } if ( ! empty ( $ operator ) ) { list ( $ class , $ name ) = explode ( $ operator , $ name ) ; //We now have to clarify class name if ( in_array ( $ class , [ 'self' , 'static' , '$this' ] ) ) { $ class = $ this -> activeDeclaration ( $ invocationTID ) ; } } return [ $ class , $ operator , $ name ] ; }
Fetching invocation context.

@param int $invocationTID
@param int $argumentsTID

@return array
Fetching invocation context .