@@ -23,7 +23,7 @@ |
||
23 | 23 | |
24 | 24 | public function createClient(array $config = []): HttpClient |
25 | 25 | { |
26 | - if (! class_exists('Http\Adapter\Guzzle5\Client')) { |
|
26 | + if (!class_exists('Http\Adapter\Guzzle5\Client')) { |
|
27 | 27 | throw new LogicException('To use the Guzzle5 adapter you need to install the "php-http/guzzle5-adapter" package.'); |
28 | 28 | } |
29 | 29 |
@@ -33,14 +33,14 @@ |
||
33 | 33 | |
34 | 34 | public function createClient(array $config = []): HttpClient |
35 | 35 | { |
36 | - if (! class_exists(Client::class)) { |
|
36 | + if (!class_exists(Client::class)) { |
|
37 | 37 | throw new LogicException('To use the Curl client you need to install the "php-http/curl-client" package.'); |
38 | 38 | } |
39 | 39 | |
40 | 40 | // Try to resolve curl constant names |
41 | 41 | foreach ($config as $key => $value) { |
42 | 42 | // If the $key is a string we assume it is a constant |
43 | - if (! is_string($key)) { |
|
43 | + if (!is_string($key)) { |
|
44 | 44 | continue; |
45 | 45 | } |
46 | 46 |
@@ -16,7 +16,7 @@ |
||
16 | 16 | |
17 | 17 | public function __construct(HttpClient $client = null) |
18 | 18 | { |
19 | - if (! class_exists(Client::class)) { |
|
19 | + if (!class_exists(Client::class)) { |
|
20 | 20 | throw new LogicException('To use the mock adapter you need to install the "php-http/mock-client" package.'); |
21 | 21 | } |
22 | 22 |
@@ -22,7 +22,7 @@ |
||
22 | 22 | |
23 | 23 | public function createClient(array $config = []): HttpClient |
24 | 24 | { |
25 | - if (! class_exists('Http\Adapter\Buzz\Client')) { |
|
25 | + if (!class_exists('Http\Adapter\Buzz\Client')) { |
|
26 | 26 | throw new \LogicException('To use the Buzz adapter you need to install the "php-http/buzz-adapter" package.'); |
27 | 27 | } |
28 | 28 |
@@ -13,7 +13,7 @@ |
||
13 | 13 | { |
14 | 14 | public function createClient(array $config = []): HttpClient |
15 | 15 | { |
16 | - if (! class_exists(Client::class)) { |
|
16 | + if (!class_exists(Client::class)) { |
|
17 | 17 | throw new LogicException('To use the Guzzle6 adapter you need to install the "php-http/guzzle6-adapter" package.'); |
18 | 18 | } |
19 | 19 |
@@ -39,7 +39,7 @@ |
||
39 | 39 | |
40 | 40 | $config = $container->get('config')['httplug']['plugins'][$pluginName][$serviceName] ?? null; |
41 | 41 | |
42 | - if (! is_array($config)) { |
|
42 | + if (!is_array($config)) { |
|
43 | 43 | return null; |
44 | 44 | } |
45 | 45 |
@@ -45,7 +45,7 @@ |
||
45 | 45 | { |
46 | 46 | $factory = $this->factories[$alias] ?? null; |
47 | 47 | |
48 | - if (! $factory) { |
|
48 | + if (!$factory) { |
|
49 | 49 | throw new InvalidArgumentException('Unable to find a plugin factory for alias ' . $alias); |
50 | 50 | } |
51 | 51 |
@@ -21,7 +21,7 @@ |
||
21 | 21 | |
22 | 22 | public function createPlugin(array $config = []): Plugin |
23 | 23 | { |
24 | - if (! class_exists(CachePlugin::class)) { |
|
24 | + if (!class_exists(CachePlugin::class)) { |
|
25 | 25 | throw new \LogicException('To use the stopwatch plugin you need to install the "php-http/stopwatch-plugin" package.'); |
26 | 26 | } |
27 | 27 |
@@ -24,13 +24,13 @@ |
||
24 | 24 | { |
25 | 25 | $cookieJarName = $config['cookie_jar'] ?? null; |
26 | 26 | |
27 | - if (! \is_string($cookieJarName)) { |
|
27 | + if (!\is_string($cookieJarName)) { |
|
28 | 28 | throw new InvalidArgumentException('Invalid "cookie_jar" parameter'); |
29 | 29 | } |
30 | 30 | |
31 | 31 | $cookieJar = $this->container->get($cookieJarName); |
32 | 32 | |
33 | - if (! $cookieJar instanceof CookieJar) { |
|
33 | + if (!$cookieJar instanceof CookieJar) { |
|
34 | 34 | throw new InvalidArgumentException('Invalid "cookie_jar" service'); |
35 | 35 | } |
36 | 36 |