@@ -30,7 +30,7 @@ |
||
| 30 | 30 | /** @var null|Authentication\AuthenticationFactory $authFactory */ |
| 31 | 31 | $authFactory = $this->factories[$type] ?? null; |
| 32 | 32 | |
| 33 | - if (! $authFactory instanceof Authentication\AuthenticationFactory) { |
|
| 33 | + if (!$authFactory instanceof Authentication\AuthenticationFactory) { |
|
| 34 | 34 | throw new InvalidArgumentException('Unsupported authentication type'); |
| 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 | |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | { |
| 13 | 13 | public function createPlugin(array $config = []): Plugin |
| 14 | 14 | { |
| 15 | - if (! class_exists(ReplayPlugin::class)) { |
|
| 15 | + if (!class_exists(ReplayPlugin::class)) { |
|
| 16 | 16 | throw new LogicException('To use the vcr replay plugin you need to install the "php-http/vcr-plugin" package.'); |
| 17 | 17 | } |
| 18 | 18 | |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | |
| 21 | 21 | public function createPlugin(array $config = []): Plugin |
| 22 | 22 | { |
| 23 | - if (! class_exists(CachePlugin::class)) { |
|
| 23 | + if (!class_exists(CachePlugin::class)) { |
|
| 24 | 24 | throw new \LogicException('To use the cache plugin you need to install the "php-http/cache-plugin" package.'); |
| 25 | 25 | } |
| 26 | 26 | |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | { |
| 13 | 13 | public function createPlugin(array $config = []): Plugin |
| 14 | 14 | { |
| 15 | - if (! class_exists(RecordPlugin::class)) { |
|
| 15 | + if (!class_exists(RecordPlugin::class)) { |
|
| 16 | 16 | throw new LogicException('To use the vcr record plugin you need to install the "php-http/vcr-plugin" package.'); |
| 17 | 17 | } |
| 18 | 18 | |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | |
| 26 | 26 | public function createClient(array $config = []): HttpClient |
| 27 | 27 | { |
| 28 | - if (! class_exists('Http\Adapter\React\Client')) { |
|
| 28 | + if (!class_exists('Http\Adapter\React\Client')) { |
|
| 29 | 29 | throw new LogicException('To use the React adapter you need to install the "php-http/react-adapter" package.'); |
| 30 | 30 | } |
| 31 | 31 | |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | |
| 23 | 23 | public function createClient(array $config = []): HttpClient |
| 24 | 24 | { |
| 25 | - if (! class_exists('Http\Client\Socket\Client')) { |
|
| 25 | + if (!class_exists('Http\Client\Socket\Client')) { |
|
| 26 | 26 | throw new LogicException('To use the Socket client you need to install the "php-http/socket-client" package.'); |
| 27 | 27 | } |
| 28 | 28 | |
@@ -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 | |