@@ -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 |
@@ -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 |
@@ -24,13 +24,13 @@ |
||
24 | 24 | { |
25 | 25 | $journalServiceName = $config['journal'] ?? null; |
26 | 26 | |
27 | - if (! \is_string($journalServiceName)) { |
|
27 | + if (!\is_string($journalServiceName)) { |
|
28 | 28 | throw new InvalidArgumentException('Invalid "journal" parameter'); |
29 | 29 | } |
30 | 30 | |
31 | 31 | $journal = $this->container->get($journalServiceName); |
32 | 32 | |
33 | - if (! $journal instanceof Journal) { |
|
33 | + if (!$journal instanceof Journal) { |
|
34 | 34 | throw new InvalidArgumentException('Invalid "journal" service'); |
35 | 35 | } |
36 | 36 |
@@ -35,13 +35,13 @@ discard block |
||
35 | 35 | { |
36 | 36 | $requestMatcherName = $config['request_matcher'] ?? null; |
37 | 37 | |
38 | - if (! is_string($requestMatcherName)) { |
|
38 | + if (!is_string($requestMatcherName)) { |
|
39 | 39 | throw new InvalidArgumentException('Invalid request matcher name'); |
40 | 40 | } |
41 | 41 | |
42 | 42 | $requestMatcher = $this->container->get($requestMatcherName); |
43 | 43 | |
44 | - if (! $requestMatcher instanceof RequestMatcher) { |
|
44 | + if (!$requestMatcher instanceof RequestMatcher) { |
|
45 | 45 | throw new InvalidArgumentException('Invalid request matcher'); |
46 | 46 | } |
47 | 47 | |
@@ -61,13 +61,13 @@ discard block |
||
61 | 61 | return $this->container->get($plugin); |
62 | 62 | } |
63 | 63 | |
64 | - if (! \is_array($plugin)) { |
|
64 | + if (!\is_array($plugin)) { |
|
65 | 65 | throw new InvalidArgumentException('Invalid plugin'); |
66 | 66 | } |
67 | 67 | |
68 | 68 | $name = $plugin['name'] ?? null; |
69 | 69 | |
70 | - if (! is_string($name)) { |
|
70 | + if (!is_string($name)) { |
|
71 | 71 | throw new InvalidArgumentException('Invalid plugin name'); |
72 | 72 | } |
73 | 73 |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | */ |
26 | 26 | public function canCreate(ContainerInterface $container, $requestedName): bool |
27 | 27 | { |
28 | - if (! preg_match('/^httplug\.clients\.[^.]+\.flexible$/', $requestedName)) { |
|
28 | + if (!preg_match('/^httplug\.clients\.[^.]+\.flexible$/', $requestedName)) { |
|
29 | 29 | return false; |
30 | 30 | } |
31 | 31 | |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | */ |
50 | 50 | public function __invoke(ContainerInterface $container, $requestedName, array $options = null): FlexibleHttpClient |
51 | 51 | { |
52 | - if (! preg_match('/^httplug\.clients\.[^.]+\.flexible$/', $requestedName)) { |
|
52 | + if (!preg_match('/^httplug\.clients\.[^.]+\.flexible$/', $requestedName)) { |
|
53 | 53 | throw new InvalidArgumentException('Invalid service name'); |
54 | 54 | } |
55 | 55 |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | */ |
26 | 26 | public function canCreate(ContainerInterface $container, $requestedName): bool |
27 | 27 | { |
28 | - if (! preg_match('/^httplug\.clients\.[^.]+\.http_methods$/', $requestedName)) { |
|
28 | + if (!preg_match('/^httplug\.clients\.[^.]+\.http_methods$/', $requestedName)) { |
|
29 | 29 | return false; |
30 | 30 | } |
31 | 31 | |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | */ |
50 | 50 | public function __invoke(ContainerInterface $container, $requestedName, array $options = null): HttpMethodsClient |
51 | 51 | { |
52 | - if (! preg_match('/^httplug\.clients\.[^.]+\.http_methods$/', $requestedName)) { |
|
52 | + if (!preg_match('/^httplug\.clients\.[^.]+\.http_methods$/', $requestedName)) { |
|
53 | 53 | throw new InvalidArgumentException('Invalid service name'); |
54 | 54 | } |
55 | 55 |
@@ -17,7 +17,7 @@ |
||
17 | 17 | */ |
18 | 18 | public function createPlugin(array $config = []): Plugin |
19 | 19 | { |
20 | - if (! class_exists(RecordPlugin::class)) { |
|
20 | + if (!class_exists(RecordPlugin::class)) { |
|
21 | 21 | throw new LogicException('To use the vcr record plugin you need to install the "php-http/vcr-plugin" package.'); |
22 | 22 | } |
23 | 23 |
@@ -28,7 +28,7 @@ |
||
28 | 28 | */ |
29 | 29 | public function createPlugin(array $config = []): Plugin |
30 | 30 | { |
31 | - if (! class_exists(CachePlugin::class)) { |
|
31 | + if (!class_exists(CachePlugin::class)) { |
|
32 | 32 | throw new \LogicException('To use the cache plugin you need to install the "php-http/cache-plugin" package.'); |
33 | 33 | } |
34 | 34 |
@@ -26,7 +26,7 @@ |
||
26 | 26 | */ |
27 | 27 | public function createPlugin(array $config = []): Plugin |
28 | 28 | { |
29 | - if (! class_exists(CachePlugin::class)) { |
|
29 | + if (!class_exists(CachePlugin::class)) { |
|
30 | 30 | throw new \LogicException('To use the stopwatch plugin you need to install the "php-http/stopwatch-plugin" package.'); |
31 | 31 | } |
32 | 32 |