Passed
Push — master ( d61b01...5e2bb2 )
by Thomas Mauro
02:08
created
src/ClientFactory/Guzzle5Factory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/ClientFactory/CurlFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,14 +33,14 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/ClientFactory/MockFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/ClientFactory/BuzzFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/ClientFactory/Guzzle6Factory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/DIFactory/AbstractServiceFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,13 +36,13 @@
 block discarded – undo
36 36
         $exploded = explode('.', $requestedName);
37 37
         $serviceName = $exploded[2] ?? null;
38 38
 
39
-        if (! $serviceName) {
39
+        if (!$serviceName) {
40 40
             throw new InvalidArgumentException('Invalid service name');
41 41
         }
42 42
 
43 43
         $keyConfig = $container->get('config')[static::MODULE_KEY][$this->getServiceTypeName()][$serviceName] ?? null;
44 44
 
45
-        if (! is_array($keyConfig)) {
45
+        if (!is_array($keyConfig)) {
46 46
             throw new InvalidArgumentException('Invalid service name');
47 47
         }
48 48
 
Please login to merge, or discard this patch.
src/DIFactory/ClientAbstractFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
     {
40 40
         $config = $this->getServiceConfig($container, $requestedName);
41 41
 
42
-        if (! empty($config['service'])) {
42
+        if (!empty($config['service'])) {
43 43
             $client = $container->get($config['service']);
44 44
         } else {
45 45
             /** @var ClientFactory $factory */
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
                 continue;
73 73
             }
74 74
 
75
-            if (! is_array($nameOrConfig) || ! is_string($nameOrConfig['name'] ?? null)) {
75
+            if (!is_array($nameOrConfig) || !is_string($nameOrConfig['name'] ?? null)) {
76 76
                 throw new InvalidArgumentException('Invalid client plugin');
77 77
             }
78 78
 
Please login to merge, or discard this patch.
src/DIFactory/HttpMethodsClientAbstractFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
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
 
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      */
48 48
     public function __invoke(ContainerInterface $container, $requestedName, array $options = null): HttpMethodsClient
49 49
     {
50
-        if (! preg_match('/httplug\.clients\.[^.]+\.http_methods/', $requestedName)) {
50
+        if (!preg_match('/httplug\.clients\.[^.]+\.http_methods/', $requestedName)) {
51 51
             throw new InvalidArgumentException('Invalid service name');
52 52
         }
53 53
 
Please login to merge, or discard this patch.
src/DIFactory/FlexibleClientAbstractFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
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
 
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      */
48 48
     public function __invoke(ContainerInterface $container, $requestedName, array $options = null): FlexibleHttpClient
49 49
     {
50
-        if (! preg_match('/httplug\.clients\.[^.]+\.flexible/', $requestedName)) {
50
+        if (!preg_match('/httplug\.clients\.[^.]+\.flexible/', $requestedName)) {
51 51
             throw new InvalidArgumentException('Invalid service name');
52 52
         }
53 53
 
Please login to merge, or discard this patch.