Passed
Branch master (a2c31d)
by Gregorio
05:13
created
src/Transformers/PregReplaceKeys.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,8 +22,9 @@
 block discarded – undo
22 22
     public function transform($data)
23 23
     {
24 24
         return collect($data)->mapWithKeys(function($value, $key) {
25
-            if (!count($this->config['properties']) || (count($this->config['properties']) && in_array($key, $this->config['properties'])))
26
-            return [preg_replace($this->config['pattern'], $this->config['replacement'], $key) => !is_array($value) ? $value : $this->transform($value)];
25
+            if (!count($this->config['properties']) || (count($this->config['properties']) && in_array($key, $this->config['properties']))) {
26
+                        return [preg_replace($this->config['pattern'], $this->config['replacement'], $key) => !is_array($value) ? $value : $this->transform($value)];
27
+            }
27 28
         })->toArray();
28 29
     }
29 30
 }
30 31
\ No newline at end of file
Please login to merge, or discard this patch.
src/Connectors/Http.php 1 patch
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,7 +19,9 @@  discard block
 block discarded – undo
19 19
      */
20 20
     protected function boot()
21 21
     {
22
-        if (!$this->config->has('client')) $this->config->set('client', []);
22
+        if (!$this->config->has('client')) {
23
+            $this->config->set('client', []);
24
+        }
23 25
 
24 26
         $this->setClient(new Client($this->config->get('client')));
25 27
     }
@@ -62,7 +64,9 @@  discard block
 block discarded – undo
62 64
      */
63 65
     public function create($uri, $data = null, $options = [])
64 66
     {
65
-        if ($data) $options['form_params'] = $data;
67
+        if ($data) {
68
+            $options['form_params'] = $data;
69
+        }
66 70
 
67 71
         return new HttpResponse($this->client->request('POST', $uri, $options));
68 72
     }
@@ -75,7 +79,9 @@  discard block
 block discarded – undo
75 79
      */
76 80
     public function update($uri, $data = null, $options = [])
77 81
     {
78
-        if ($data) $options['form_params'] = $data;
82
+        if ($data) {
83
+            $options['form_params'] = $data;
84
+        }
79 85
 
80 86
         return new HttpResponse($this->client->request('PATCH', $uri, $options));
81 87
     }
@@ -88,7 +94,9 @@  discard block
 block discarded – undo
88 94
      */
89 95
     public function replace($uri, $data = null, $options = [])
90 96
     {
91
-        if ($data) $options['form_params'] = $data;
97
+        if ($data) {
98
+            $options['form_params'] = $data;
99
+        }
92 100
 
93 101
         return new HttpResponse($this->client->request('PUT', $uri, $options));
94 102
     }
Please login to merge, or discard this patch.