src/Reflection/ReflectionFile.php
private function activeDeclaration(int $tokenID): string
    {
        foreach ($this->declarations as $declarations) {
            foreach ($declarations as $name => $position) {
                if ($tokenID >= $position[self::O_TOKEN] && $tokenID <= $position[self::C_TOKEN]) {
                    return $name;
                }
            }
        }

        //Can not be detected
        return '';
    }
private function activeDeclaration(int $tokenID): string
    {
        foreach ($this->declarations as $declarations) {
            foreach ($declarations as $name => $position) {
                if ($tokenID >= $position[self::O_TOKEN] && $tokenID <= $position[self::C_TOKEN]) {
                    return $name;
                }
            }
        }

        //Can not be detected
        return '';
    }
private function activeDeclaration ( int $ tokenID ) : string { foreach ( $ this -> declarations as $ declarations ) { foreach ( $ declarations as $ name => $ position ) { if ( $ tokenID >= $ position [ self :: O_TOKEN ] && $ tokenID <= $ position [ self :: C_TOKEN ] ) { return $ name ; } } } //Can not be detected return '' ; }
Get declaration which is active in given token position.

@param int $tokenID

@return string|null
Get declaration which is active in given token position .