protected function resolveParameters(array $reflectionParameters, array $providedParameters, ?ReflectionClass $class = null): array
	{
		if(empty($reflectionParameters))
		{
			return array_values($providedParameters);
		}

		// Merge provided parameters with the ones we got using reflection

		$parameters = $this->mergeParameters($reflectionParameters, $providedParameters);

		// Loop through the parameters and resolve the ones that need resolving

		foreach($parameters as $key => $parameter)
		{
			if($parameter instanceof ReflectionParameter)
			{
				$parameters[$key] = $this->resolveParameter($parameter, $class);
			}
		}

		// Return resolved parameters

		return array_values($parameters);
	}