Passed
Push — master ( 711a5c...4de2a2 )
by Joao
05:28 queued 11s
created
src/AbstractRequester.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -210,11 +210,11 @@
 block discarded – undo
210 210
         try {
211 211
             $response = $this->handleRequest($request);
212 212
             $responseHeader = $response->getHeaders();
213
-            $responseBody = json_decode((string) $response->getBody(), true);
213
+            $responseBody = json_decode((string)$response->getBody(), true);
214 214
             $statusReturned = $response->getStatusCode();
215 215
         } catch (BadResponseException $ex) {
216 216
             $responseHeader = $ex->getResponse()->getHeaders();
217
-            $responseBody = json_decode((string) $ex->getResponse()->getBody(), true);
217
+            $responseBody = json_decode((string)$ex->getResponse()->getBody(), true);
218 218
             $statusReturned = $ex->getResponse()->getStatusCode();
219 219
         }
220 220
 
Please login to merge, or discard this patch.
src/Base/Body.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -11,8 +11,8 @@  discard block
 block discarded – undo
11 11
 
12 12
 abstract class Body
13 13
 {
14
-    const SWAGGER_PROPERTIES="properties";
15
-    const SWAGGER_REQUIRED="required";
14
+    const SWAGGER_PROPERTIES = "properties";
15
+    const SWAGGER_REQUIRED = "required";
16 16
 
17 17
     /**
18 18
      * @var Schema
@@ -150,27 +150,27 @@  discard block
 block discarded – undo
150 150
         $nullable = isset($schema['nullable']) ? (bool)$schema['nullable'] : $this->schema->isAllowNullValues();
151 151
 
152 152
         $validators = [
153
-            function () use ($name, $body, $type, $nullable)
153
+            function() use ($name, $body, $type, $nullable)
154 154
             {
155 155
                 return $this->matchNull($name, $body, $type, $nullable);
156 156
             },
157 157
 
158
-            function () use ($name, $schema, $body, $type)
158
+            function() use ($name, $schema, $body, $type)
159 159
             {
160 160
                 return $this->matchString($name, $schema, $body, $type);
161 161
             },
162 162
 
163
-            function () use ($name, $body, $type)
163
+            function() use ($name, $body, $type)
164 164
             {
165 165
                 return $this->matchNumber($name, $body, $type);
166 166
             },
167 167
 
168
-            function () use ($name, $body, $type)
168
+            function() use ($name, $body, $type)
169 169
             {
170 170
                 return $this->matchBool($name, $body, $type);
171 171
             },
172 172
 
173
-            function () use ($name, $schema, $body, $type)
173
+            function() use ($name, $schema, $body, $type)
174 174
             {
175 175
                 return $this->matchArray($name, $schema, $body, $type);
176 176
             }
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
             return true;
271 271
         }
272 272
 
273
-        if(!isset($schema['$ref']) && isset($schema['content'])) {
273
+        if (!isset($schema['$ref']) && isset($schema['content'])) {
274 274
             $schema['$ref'] = $schema['content'][key($schema['content'])]['schema']['$ref'];
275 275
         }
276 276
 
Please login to merge, or discard this patch.
src/Swagger/SwaggerSchema.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
             throw new InvalidArgumentException('schema must be given as array or JSON string');
30 30
         }
31 31
         $this->jsonFile = $data;
32
-        $this->allowNullValues = (bool) $allowNullValues;
32
+        $this->allowNullValues = (bool)$allowNullValues;
33 33
     }
34 34
 
35 35
     public function getHttpSchema()
@@ -121,6 +121,6 @@  discard block
 block discarded – undo
121 121
      */
122 122
     public function setAllowNullValues($value)
123 123
     {
124
-        $this->allowNullValues = (bool) $value;
124
+        $this->allowNullValues = (bool)$value;
125 125
     }
126 126
 }
Please login to merge, or discard this patch.
src/ApiTestCase.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace ByJG\ApiTools;
4 4
 
5
-use ByJG\ApiTools\Base\BaseTestCase;
6 5
 use ByJG\ApiTools\Base\Schema;
7 6
 use ByJG\ApiTools\Exception\DefinitionNotFoundException;
8 7
 use ByJG\ApiTools\Exception\GenericSwaggerException;
Please login to merge, or discard this patch.