src/ReactFactory.php
protected static function buildHttpClient05(
        LoopInterface $loop,
        $connector = null
    ) {
        // build a connector with given DnsResolver if provided (old deprecated behavior)
        if ($connector instanceof DnsResolver) {
            @trigger_error(
                sprintf(
                    'Passing a %s to buildHttpClient is deprecated since version 2.1.0 and will be removed in 3.0. If you need no specific behaviour, omit the $dns argument, otherwise pass a %s',
                    DnsResolver::class,
                    ConnectorInterface::class
                ),
                E_USER_DEPRECATED
            );
            $connector = static::buildConnector($loop, $connector);
        }

        // validate connector instance for proper error reporting
        if (null !== $connector && !$connector instanceof ConnectorInterface) {
            throw new \InvalidArgumentException(
                '$connector must be an instance of DnsResolver or ConnectorInterface'
            );
        }

        return new HttpClient($loop, $connector);
    }
protected static function buildHttpClient05(
        LoopInterface $loop,
        $connector = null
    ) {
        // build a connector with given DnsResolver if provided (old deprecated behavior)
        if ($connector instanceof DnsResolver) {
            @trigger_error(
                sprintf(
                    'Passing a %s to buildHttpClient is deprecated since version 2.1.0 and will be removed in 3.0. If you need no specific behaviour, omit the $dns argument, otherwise pass a %s',
                    DnsResolver::class,
                    ConnectorInterface::class
                ),
                E_USER_DEPRECATED
            );
            $connector = static::buildConnector($loop, $connector);
        }

        // validate connector instance for proper error reporting
        if (null !== $connector && !$connector instanceof ConnectorInterface) {
            throw new \InvalidArgumentException(
                '$connector must be an instance of DnsResolver or ConnectorInterface'
            );
        }

        return new HttpClient($loop, $connector);
    }
Builds a React Http client v0.5 style.

@param LoopInterface                       $loop
@param DnsResolver|ConnectorInterface|null $connector

@return HttpClient