src/Reflection/ReflectionFile.php
private function registerDeclaration(int $tokenID, int $tokenType)
    {
        $localID = $tokenID + 1;
        while ($this->tokens[$localID][self::TOKEN_TYPE] != T_STRING) {
            ++$localID;
        }

        $name = $this->tokens[$localID][self::TOKEN_CODE];
        if (!empty($namespace = $this->activeNamespace($tokenID))) {
            $name = $namespace . self::NS_SEPARATOR . $name;
        }

        $this->declarations[token_name($tokenType)][$name] = [
            self::O_TOKEN => $tokenID,
            self::C_TOKEN => $this->endingToken($tokenID),
        ];
    }
private function registerDeclaration(int $tokenID, int $tokenType)
    {
        $localID = $tokenID + 1;
        while ($this->tokens[$localID][self::TOKEN_TYPE] != T_STRING) {
            ++$localID;
        }

        $name = $this->tokens[$localID][self::TOKEN_CODE];
        if (!empty($namespace = $this->activeNamespace($tokenID))) {
            $name = $namespace . self::NS_SEPARATOR . $name;
        }

        $this->declarations[token_name($tokenType)][$name] = [
            self::O_TOKEN => $tokenID,
            self::C_TOKEN => $this->endingToken($tokenID),
        ];
    }
private function registerDeclaration ( int $ tokenID , int $ tokenType ) { $ localID = $ tokenID + 1 ; while ( $ this -> tokens [ $ localID ] [ self :: TOKEN_TYPE ] != T_STRING ) { ++ $ localID ; } $ name = $ this -> tokens [ $ localID ] [ self :: TOKEN_CODE ] ; if ( ! empty ( $ namespace = $ this -> activeNamespace ( $ tokenID ) ) ) { $ name = $ namespace . self :: NS_SEPARATOR . $ name ; } $ this -> declarations [ token_name ( $ tokenType ) ] [ $ name ] = [ self :: O_TOKEN => $ tokenID , self :: C_TOKEN => $ this -> endingToken ( $ tokenID ) , ] ; }
Handle declaration of class, trait of interface. Declaration will be stored under it's token
type in declarations array.

@param int $tokenID
@param int $tokenType
Handle declaration of class trait of interface . Declaration will be stored under it s token type in declarations array .