Make a new client instance.

@return \Bugsnag\Client
171926
public function make()
    {
        $guzzle = Client::makeGuzzle($this->endpoint);

        $client = new Client(new Config($this->key ?: ''), $this->resolver, $guzzle);

        if ($this->callbacks) {
            $client->registerDefaultCallbacks();
        }

        if ($this->tokens && $this->checker && $this->user) {
            $this->setupUserDetection($client, $this->tokens, $this->checker);
        }

        $this->setupPaths($client, $this->strip, $this->project, $this->root);

        $client->setReleaseStage($this->stage ?: ($this->env === 'prod' ? 'production' : $this->env));

        $client->setAppVersion($this->version);
        $client->setFallbackType('Console');
        $client->setAppType($this->type);

        $client->setBatchSending($this->batch);
        $client->setHostname($this->hostname);
        $client->setSendCode($this->code);

        $client->setNotifier(array_filter([
            'name' => 'Bugsnag Symfony',
            'version' => BugsnagBundle::VERSION,
            'url' => 'https://github.com/bugsnag/bugsnag-symfony',
        ]));

        if ($this->stages) {
            $client->setNotifyReleaseStages($this->stages);
        }

        if ($this->filters) {
            $client->setFilters($this->filters);
        }

        return $client;
    }
39939
private function getInstanceAdminClient()
    {
        //@codeCoverageIgnoreStart
        if ($this->instanceAdminClient) {
            return $this->instanceAdminClient;
        }
        //@codeCoverageIgnoreEnd

        $this->instanceAdminClient = new InstanceAdminClient($this->grpcConfig);

        return $this->instanceAdminClient;
    }
801384
public function create()
    {
        $instance = self::createCustomerGroup($this);
        $this->setId($instance->getId());
        return $instance;
    }
521357
public function create()
    {
        $instance = self::createOptionSet($this);
        $this->setId($instance->getId());
        return $instance;
    }
998644
public function getClient(): ClientInterface
    {
        if ($this->client === null) {
            $this->client = new Client();
        }

        return $this->client;
    }
671892
public function create()
    {
        $instance = self::createReturnLineItem($this);
        $this->setId($instance->getId());
        return $instance;
    }
1006616
protected function create()
    {
        $this->user = app(\SuperV\Platform\Domains\Auth\Contracts\User::class)->create([
            'name'    => $this->request['name'],
            'email'    => $this->request['email'],
            'password' => bcrypt($this->request['password']),
        ]);

        return $this;
    }
296265
public function create()
    {
        $pluginClient = new PluginClient($this->httpClient, [
            new BaseUriPlugin($this->uriFactory->createUri($this->api_url), ['replace' => true]),
            new AuthenticationPlugin(new BasicAuth($this->api_key, '')),
            new ErrorPlugin(),
            new ContentTypePlugin(),
        ]);

        return new Client($pluginClient, $this->apiRequestFactory);
    }
676030
public static function newInstance()
    {
        $config = self::create();

        $config->username = 'null';
        $config->password = 'null';
        $config->credentials = ['null', 'null'];
        $config->bindtoInterface = 'null';
        $config->timeout = 5;

        return $config;
    }
166860
public function setupClient()
    {
        /* Return if already set */
        if ($this->client)
            return $this;

        /* Set the options for the SOAP request */
        $sslContext = array(
            'ssl' => array(
                'allow_self_signed' => false,
                'verify_peer' => false /* Temporary fix */
            )
        );

        $soapArguments = array(
            'location' => $this->service,
            'encoding' => 'UTF-8',
            'cache_wsdl' => 'WSDL_CACHE_NONE',
            'stream_context' => stream_context_create($sslContext)
        );

        /* Start a new client */
        $this->client = new SoapClient($this->service, $soapArguments);

        /* Client configuration */
        $this->client->soap_defencoding = "utf-8";

        return $this;
    }
746105
private function createClient(): Client
    {
        $stack = new HandlerStack();
        $stack->setHandler(new CurlHandler());

        if ($this->user === null) {
            $stack->push(GuzzleJWTMiddleware::authTokenMiddleware(
                $this->tenant->getAddonKey(),
                $this->tenant->getSharedSecret()
            ));
        } else {
            $stack->push(GuzzleJWTMiddleware::authUserTokenMiddleware(
                $this->tenant->getOauthClientId(),
                $this->tenant->getSharedSecret(),
                $this->tenant->getBaseUrl(),
                $this->user
            ));
        }

        return new Client(['handler' => $stack]);
    }
47204
public function create()
    {
        $instance = self::createVariant($this);
        $this->setId($instance->getId());
        return $instance;
    }
19621
public function create()
    {
        $instance = self::createState($this);
        $this->setId($instance->getId());
        return $instance;
    }
373150
public function makeInstance()
    {
        $class = $this->getVersionedRedisSentinelManagerClass();
        $config = $this->config->get('database.redis-sentinel', [ ]);
        $driver = Arr::pull($config, 'client', 'predis');

        // Laravel 5.7 introduced the app as the first parameter:
        if ($this->appVersionLessThan('5.7')) {
            return new RedisSentinelManager(new $class($driver, $config));
        }

        return new RedisSentinelManager(new $class($this->app, $driver, $config));

    }
374263
public function create()
    {
        $instance = self::createFreeShippingPromotion($this);
        $this->setId($instance->getId());
        return $instance;
    }
721575
protected function getClient(): HttpClient
    {
        if ($this->client === null) {
            $this->client = new HttpClient($this->getClientConfig());
        }

        return $this->client;
    }
844991
public function create()
    {
        $instance = self::createBraintreeGateway($this);
        $this->setId($instance->getId());
        return $instance;
    }