You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Bridge/Guzzle/HttpClientFactory.php
+7-5Lines changed: 7 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,8 @@
3
3
namespacePayum\Core\Bridge\Guzzle;
4
4
5
5
useGuzzleHttp\Client;
6
+
useGuzzleHttp\ClientInterface;
7
+
useLogicException;
6
8
usePayum\Core\HttpClientInterface;
7
9
8
10
/**
@@ -13,19 +15,19 @@ class HttpClientFactory
13
15
/**
14
16
* Create a Guzzle client.
15
17
*
16
-
* @return \GuzzleHttp\Client
18
+
* @return Client
17
19
*/
18
20
publicstaticfunctioncreateGuzzle()
19
21
{
20
22
$client = null;
21
23
if (! class_exists(Client::class)) {
22
24
@trigger_error('The function "HttpClientFactory::createGuzzle" is depcrecated and will be removed in 2.0.', E_USER_DEPRECATED);
23
-
thrownew\LogicException('Can not use "HttpClientFactory::createGuzzle" since Guzzle is not installed. This function is deprecated and will be removed in 2.0.');
25
+
thrownewLogicException('Can not use "HttpClientFactory::createGuzzle" since Guzzle is not installed. This function is deprecated and will be removed in 2.0.');
24
26
}
25
27
26
-
$version = \GuzzleHttp\ClientInterface::VERSION;
28
+
$version = ClientInterface::VERSION;
27
29
if ('6' !== substr($version, 0, 1)) {
28
-
thrownew\LogicException('This version of Guzzle is not supported.');
30
+
thrownewLogicException('This version of Guzzle is not supported.');
29
31
}
30
32
31
33
$curl = curl_version();
@@ -34,7 +36,7 @@ public static function createGuzzle()
@@ -70,7 +72,7 @@ public function __construct($tableGateway, $modelClass, $idField = 'id')
70
72
@trigger_error(sprintf('Passing an instance of %s as the first argument to %s is deprecated and won\'t be supported in 2.0. Please using Laminas instead.', ZendTableGateway::class, self::class));
71
73
$this->tableGateway = $tableGateway;
72
74
} else {
73
-
thrownew\InvalidArgumentException(sprintf('Argument $tableGateway of %s must be an instance of %s or %s, %s given.', self::class, LaminasTableGateway::class, ZendTableGateway::class, (is_object($tableGateway) ? get_class($tableGateway) : gettype($tableGateway))));
75
+
thrownewInvalidArgumentException(sprintf('Argument $tableGateway of %s must be an instance of %s or %s, %s given.', self::class, LaminasTableGateway::class, ZendTableGateway::class, (is_object($tableGateway) ? get_class($tableGateway) : gettype($tableGateway))));
74
76
}
75
77
76
78
$this->idField = $idField;
@@ -127,7 +129,7 @@ protected function doGetIdentity($model)
0 commit comments