File "GuzzleMockClientFactoryMethod.php"

Full Path: /home/cananyalcin/public_html/core/lib/coinbase/coinbase-commerce/tests/GuzzleClientMock/GuzzleMockClientFactoryMethod.php
File size: 462 bytes
MIME-type: text/x-php
Charset: utf-8

<?php
namespace CoinbaseCommerce\Tests\GuzzleClientMock;

class GuzzleMockClientFactoryMethod
{
    public static function create()
    {
        if (class_exists('GuzzleHttp\Handler\MockHandler')) {
            return new NewGuzzleHelperHelper();
        } elseif (class_exists('GuzzleHttp\Subscriber\Mock')) {
            return new OldGuzzleHelperHelper();
        } else {
            throw new \Exception('Not supported Guzzle version.');
        }
    }
}