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

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

private instantiateWrappedObject ( ) : object
Результат object
    private function instantiateWrappedObject()
    {
        if ($this->wrappedObject->getFactoryMethod()) {
            return $this->newInstanceWithFactoryMethod();
        }
        $reflection = new ReflectionClass($this->wrappedObject->getClassName());
        if (count($this->wrappedObject->getArguments())) {
            return $this->newInstanceWithArguments($reflection);
        }
        return $reflection->newInstance();
    }