Zend\Code\Generator\ParameterGenerator::expandLiteralParameterType PHP Method

expandLiteralParameterType() private static method

private static expandLiteralParameterType ( string $literalParameterType, ReflectionParameter $reflectionParameter ) : string
$literalParameterType string
$reflectionParameter ReflectionParameter
return string
    private static function expandLiteralParameterType($literalParameterType, ReflectionParameter $reflectionParameter)
    {
        if ('self' === strtolower($literalParameterType)) {
            return $reflectionParameter->getDeclaringClass()->getName();
        }
        if ('parent' === strtolower($literalParameterType)) {
            return $reflectionParameter->getDeclaringClass()->getParentClass()->getName();
        }
        return $literalParameterType;
    }