private function getArguments(\ReflectionMethod $method)
    {
        $arguments = [];

        foreach ($method->getParameters() as $index => $parameter) {
            $argument = $this->getArgument($index, $parameter);

            if (null === $argument && false === $parameter->allowsNull()) {
                throw new Exception(
                    sprintf('Could not inject parameter #%d into "%s::__construct"', $index, $this->item)
                );
            }

            $arguments[] = $argument;
        }

        return $arguments;
    }