protected function resolveArguments(
        ReflectionMethod $method,
        array $arguments
    ) {
        $params = $method->getParameters();
        $result = [];

        foreach ($params as $param) {
            /** @var ReflectionParameter $param */
            if (isset($arguments[$param->name])) {
                $result[$param->name] = $arguments[$param->name];
                continue;
            }

            $class = $param->getClass();
            if ($class) {
                $className = $class->getName();
                if ($this->isShared($className)) {
                    $result[$className] = isset($this->sharedInstances[$className])
                        ? $this->sharedInstances[$className]
                        : $this->get($className);
                } else {
                    $result[$className] = $this->create($className);
                }
            }
        }

        return $result;
    }
protected function resolveArguments(
        ReflectionMethod $method,
        array $arguments
    ) {
        $params = $method->getParameters();
        $result = [];

        foreach ($params as $param) {
            /** @var ReflectionParameter $param */
            if (isset($arguments[$param->name])) {
                $result[$param->name] = $arguments[$param->name];
                continue;
            }

            $class = $param->getClass();
            if ($class) {
                $className = $class->getName();
                if ($this->isShared($className)) {
                    $result[$className] = isset($this->sharedInstances[$className])
                        ? $this->sharedInstances[$className]
                        : $this->get($className);
                } else {
                    $result[$className] = $this->create($className);
                }
            }
        }

        return $result;
    }
protected function resolveArguments ( ReflectionMethod $ method , array $ arguments ) { $ params = $ method -> getParameters ( ) ; $ result = [ ] ; foreach ( $ params as $ param ) { /** @var ReflectionParameter $param */ if ( isset ( $ arguments [ $ param -> name ] ) ) { $ result [ $ param -> name ] = $ arguments [ $ param -> name ] ; continue ; } $ class = $ param -> getClass ( ) ; if ( $ class ) { $ className = $ class -> getName ( ) ; if ( $ this -> isShared ( $ className ) ) { $ result [ $ className ] = isset ( $ this -> sharedInstances [ $ className ] ) ? $ this -> sharedInstances [ $ className ] : $ this -> get ( $ className ) ; } else { $ result [ $ className ] = $ this -> create ( $ className ) ; } } } return $ result ; }
Resolve argument of method.

@param ReflectionMethod $method
@param array $arguments
@return array
Resolve argument of method .