PhpSpec\Wrapper\Subject\Caller::newInstanceWithArguments PHP Метод

newInstanceWithArguments() приватный Метод

private newInstanceWithArguments ( ReflectionClass $reflection ) : object
$reflection ReflectionClass
Результат object
    private function newInstanceWithArguments(ReflectionClass $reflection)
    {
        try {
            return $reflection->newInstanceArgs($this->wrappedObject->getArguments());
        } catch (ReflectionException $e) {
            if ($this->detectMissingConstructorMessage($e)) {
                throw $this->methodNotFound('__construct', $this->wrappedObject->getArguments());
            }
            throw $e;
        }
    }