protected function createClient($id, $config)
    {
        $config['id'] = $id;

        if (!isset($config['httpClient']) && $this->httpClient !== null) {
            $config['httpClient'] = $this->httpClient;
        }

        return Yii::createObject($config);
    }