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;
    }
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;
    }
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 ; }
Resolve all required constructor arguments

@param \ReflectionMethod $method
@throws \ReflectionException
@throws \Janeiro\Di\Exception
@throws \Janeiro\Di\NotFoundException
@return array
Resolve all required constructor arguments