Completed
Push — master ( 1a030a...6f5481 )
by Thomas Mauro
17s queued 11s
created
src/ClientFactory/ReactFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
      */
31 31
     public function createClient(array $config = []): HttpClient
32 32
     {
33
-        if (! class_exists('Http\Adapter\React\Client')) {
33
+        if (!class_exists('Http\Adapter\React\Client')) {
34 34
             throw new LogicException('To use the React adapter you need to install the "php-http/react-adapter" package.');
35 35
         }
36 36
 
Please login to merge, or discard this patch.
src/ClientFactory/SocketFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
      */
28 28
     public function createClient(array $config = []): HttpClient
29 29
     {
30
-        if (! class_exists(Client::class)) {
30
+        if (!class_exists(Client::class)) {
31 31
             throw new LogicException('To use the Socket client you need to install the "php-http/socket-client" package.');
32 32
         }
33 33
 
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
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
      */
27 27
     public function createClient(array $config = []): HttpClient
28 28
     {
29
-        if (! class_exists(FileGetContents::class)) {
29
+        if (!class_exists(FileGetContents::class)) {
30 30
             throw new \LogicException('To use the Buzz adapter you need to install the "kriswallsmith/buzz: ^1.0" package.');
31 31
         }
32 32
 
Please login to merge, or discard this patch.
src/ClientFactory/Guzzle5Factory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
      */
29 29
     public function createClient(array $config = []): HttpClient
30 30
     {
31
-        if (! class_exists('Http\Adapter\Guzzle5\Client')) {
31
+        if (!class_exists('Http\Adapter\Guzzle5\Client')) {
32 32
             throw new LogicException('To use the Guzzle5 adapter you need to install the "php-http/guzzle5-adapter" package.');
33 33
         }
34 34
 
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
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
      */
19 19
     public function createClient(array $config = []): HttpClient
20 20
     {
21
-        if (! class_exists(Client::class)) {
21
+        if (!class_exists(Client::class)) {
22 22
             throw new LogicException('To use the Guzzle6 adapter you need to install the "php-http/guzzle6-adapter" package.');
23 23
         }
24 24
 
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
@@ -39,14 +39,14 @@
 block discarded – undo
39 39
      */
40 40
     public function createClient(array $config = []): HttpClient
41 41
     {
42
-        if (! class_exists(Client::class)) {
42
+        if (!class_exists(Client::class)) {
43 43
             throw new LogicException('To use the Curl client you need to install the "php-http/curl-client" package.');
44 44
         }
45 45
 
46 46
         // Try to resolve curl constant names
47 47
         foreach ($config as $key => $value) {
48 48
             // If the $key is a string we assume it is a constant
49
-            if (! is_string($key)) {
49
+            if (!is_string($key)) {
50 50
                 continue;
51 51
             }
52 52
 
Please login to merge, or discard this patch.
src/DIFactory/ClientAbstractFactory.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
      */
34 34
     public function canCreate(ContainerInterface $container, $requestedName): bool
35 35
     {
36
-        if (! preg_match('/^httplug\.clients\.[^.]+$/', $requestedName)) {
36
+        if (!preg_match('/^httplug\.clients\.[^.]+$/', $requestedName)) {
37 37
             return false;
38 38
         }
39 39
 
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
      */
60 60
     public function __invoke(ContainerInterface $container, $requestedName, array $options = null): HttpClient
61 61
     {
62
-        if (! preg_match('/^httplug\.clients\.[^.]+$/', $requestedName)) {
62
+        if (!preg_match('/^httplug\.clients\.[^.]+$/', $requestedName)) {
63 63
             throw new InvalidArgumentException('Invalid service name');
64 64
         }
65 65
 
@@ -67,11 +67,11 @@  discard block
 block discarded – undo
67 67
 
68 68
         $config = $container->get('config')['httplug']['clients'][$clientName] ?? null;
69 69
 
70
-        if (! is_array($config)) {
70
+        if (!is_array($config)) {
71 71
             throw new InvalidArgumentException('Invalid service name');
72 72
         }
73 73
 
74
-        if (! empty($config['service'])) {
74
+        if (!empty($config['service'])) {
75 75
             $client = $container->get($config['service']);
76 76
         } else {
77 77
             /** @var ClientFactory $factory */
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
                 continue;
111 111
             }
112 112
 
113
-            if (! is_array($nameOrConfig) || ! is_string($nameOrConfig['name'] ?? null)) {
113
+            if (!is_array($nameOrConfig) || !is_string($nameOrConfig['name'] ?? null)) {
114 114
                 throw new InvalidArgumentException('Invalid client plugin');
115 115
             }
116 116
 
Please login to merge, or discard this patch.
src/PluginFactory/VcrRecordFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/PluginFactory/CacheFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.