src/mako/syringe/Container.php
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);
	}
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);
	}
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 ) ; }
Resolve parameters.

@param  array                 $reflectionParameters Reflection parameters
@param  array                 $providedParameters   Provided Parameters
@param  \ReflectionClass|null $class                ReflectionClass instance
@return array
Resolve parameters .