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; }