code: protected function resolveMethodParameters($params = [])
      {
          if (!is_array($params)) {
              throw new \InvalidArgumentException(
                  sprintf("Parameter 1 of %s must be an array.", __METHOD__)
              );
          }
  
          foreach ($params as $key => $value) {
              if ($value instanceof \ReflectionParameter) {
                  $class = $value->getClass();
  
                  if ($class instanceof \ReflectionClass) {
                      if ($class->isInterface()) {
                          $params[$key] = $this->getConcreteFromInterface($class->getName());
                      } else {
                          $params[$key] = $this->circularDependencyResolver($class->getName());
                      }
                  } else {
                      $params[$key] = ($value->isDefaultValueAvailable()
                          ? $value->getDefaultValue() : null);
                  }
              } else {
                  if (is_string($value) && class_exists($value)) {
                      $params[$key] = $this->circularDependencyResolver($value);
                  } elseif ($value instanceof \Closure) {
                      $params[$key] = $value($this);
                  } else {
                      $params[$key] = $value;
                  }
              }
          }
  
          return $params;
      }
docs: Resolve method parameters.
  
  @param array $params The unresolvable method.
  @return array