getParameters() as $position => $parameterReflection) { if (!$parameterReflection->getDefaultValue() instanceof Type && !$parameterReflection->isVariadic()) { $requireParams[$position] = $parameterReflection; } else { $optionalParams[$position] = $parameterReflection; } } return $requireParams + $optionalParams; } }