@@ -29,7 +29,7 @@ |
||
29 | 29 | return true; |
30 | 30 | } |
31 | 31 | |
32 | - if(!isset($this->structure['content']) && isset($this->structure['$ref'])){ |
|
32 | + if (!isset($this->structure['content']) && isset($this->structure['$ref'])) { |
|
33 | 33 | $defintion = $this->schema->getDefinition($this->structure['$ref']); |
34 | 34 | return $this->matchSchema($this->name, $defintion, $body); |
35 | 35 | } |
@@ -15,8 +15,8 @@ discard block |
||
15 | 15 | |
16 | 16 | abstract class Body |
17 | 17 | { |
18 | - const SWAGGER_PROPERTIES="properties"; |
|
19 | - const SWAGGER_REQUIRED="required"; |
|
18 | + const SWAGGER_PROPERTIES = "properties"; |
|
19 | + const SWAGGER_REQUIRED = "required"; |
|
20 | 20 | |
21 | 21 | /** |
22 | 22 | * @var Schema |
@@ -192,32 +192,32 @@ discard block |
||
192 | 192 | $nullable = isset($schema['nullable']) ? (bool)$schema['nullable'] : $this->schema->isAllowNullValues(); |
193 | 193 | |
194 | 194 | $validators = [ |
195 | - function () use ($name, $body, $type, $nullable) |
|
195 | + function() use ($name, $body, $type, $nullable) |
|
196 | 196 | { |
197 | 197 | return $this->matchNull($name, $body, $type, $nullable); |
198 | 198 | }, |
199 | 199 | |
200 | - function () use ($name, $schema, $body, $type) |
|
200 | + function() use ($name, $schema, $body, $type) |
|
201 | 201 | { |
202 | 202 | return $this->matchString($name, $schema, $body, $type); |
203 | 203 | }, |
204 | 204 | |
205 | - function () use ($name, $body, $type) |
|
205 | + function() use ($name, $body, $type) |
|
206 | 206 | { |
207 | 207 | return $this->matchNumber($name, $body, $type); |
208 | 208 | }, |
209 | 209 | |
210 | - function () use ($name, $body, $type) |
|
210 | + function() use ($name, $body, $type) |
|
211 | 211 | { |
212 | 212 | return $this->matchBool($name, $body, $type); |
213 | 213 | }, |
214 | 214 | |
215 | - function () use ($name, $schema, $body, $type) |
|
215 | + function() use ($name, $schema, $body, $type) |
|
216 | 216 | { |
217 | 217 | return $this->matchArray($name, $schema, $body, $type); |
218 | 218 | }, |
219 | 219 | |
220 | - function () use ($name, $schema, $body, $type) |
|
220 | + function() use ($name, $schema, $body, $type) |
|
221 | 221 | { |
222 | 222 | return $this->matchFile($name, $schema, $body, $type); |
223 | 223 | }, |
@@ -317,7 +317,7 @@ discard block |
||
317 | 317 | return true; |
318 | 318 | } |
319 | 319 | |
320 | - if(!isset($schema['$ref']) && isset($schema['content'])) { |
|
320 | + if (!isset($schema['$ref']) && isset($schema['content'])) { |
|
321 | 321 | $schema['$ref'] = $schema['content'][key($schema['content'])]['schema']['$ref']; |
322 | 322 | } |
323 | 323 |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | ->withPort($uriSchema->getPort()) |
205 | 205 | ->withPath($uriSchema->getPath() . $this->psr7Request->getUri()->getPath()); |
206 | 206 | |
207 | - if (!preg_match("~^{$this->schema->getBasePath()}~", $uri->getPath())) { |
|
207 | + if (!preg_match("~^{$this->schema->getBasePath()}~", $uri->getPath())) { |
|
208 | 208 | $uri = $uri->withPath($this->schema->getBasePath() . $uri->getPath()); |
209 | 209 | } |
210 | 210 | |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | // Handle Request |
233 | 233 | $response = $this->handleRequest($this->psr7Request); |
234 | 234 | $responseHeader = $response->getHeaders(); |
235 | - $responseBodyStr = (string) $response->getBody(); |
|
235 | + $responseBodyStr = (string)$response->getBody(); |
|
236 | 236 | $responseBody = json_decode($responseBodyStr, true); |
237 | 237 | $statusReturned = $response->getStatusCode(); |
238 | 238 |