@@ -15,9 +15,9 @@ discard block |
||
| 15 | 15 | |
| 16 | 16 | abstract class Body |
| 17 | 17 | { |
| 18 | - const SWAGGER_PROPERTIES="properties"; |
|
| 19 | - const SWAGGER_ADDITIONAL_PROPERTIES="additionalProperties"; |
|
| 20 | - const SWAGGER_REQUIRED="required"; |
|
| 18 | + const SWAGGER_PROPERTIES = "properties"; |
|
| 19 | + const SWAGGER_ADDITIONAL_PROPERTIES = "additionalProperties"; |
|
| 20 | + const SWAGGER_REQUIRED = "required"; |
|
| 21 | 21 | |
| 22 | 22 | /** |
| 23 | 23 | * @var Schema |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | return new OpenApiResponseBody($schema, $name, $structure, $allowNullValues); |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | - throw new GenericSwaggerException("Cannot get instance SwaggerBody or SchemaBody from " . get_class($schema)); |
|
| 82 | + throw new GenericSwaggerException("Cannot get instance SwaggerBody or SchemaBody from ".get_class($schema)); |
|
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | abstract public function match($body); |
@@ -204,32 +204,32 @@ discard block |
||
| 204 | 204 | $nullable = isset($schemaArray['nullable']) ? (bool)$schemaArray['nullable'] : $this->schema->isAllowNullValues(); |
| 205 | 205 | |
| 206 | 206 | $validators = [ |
| 207 | - function () use ($name, $body, $type, $nullable) |
|
| 207 | + function() use ($name, $body, $type, $nullable) |
|
| 208 | 208 | { |
| 209 | 209 | return $this->matchNull($name, $body, $type, $nullable); |
| 210 | 210 | }, |
| 211 | 211 | |
| 212 | - function () use ($name, $schemaArray, $body, $type) |
|
| 212 | + function() use ($name, $schemaArray, $body, $type) |
|
| 213 | 213 | { |
| 214 | 214 | return $this->matchString($name, $schemaArray, $body, $type); |
| 215 | 215 | }, |
| 216 | 216 | |
| 217 | - function () use ($name, $body, $type) |
|
| 217 | + function() use ($name, $body, $type) |
|
| 218 | 218 | { |
| 219 | 219 | return $this->matchNumber($name, $body, $type); |
| 220 | 220 | }, |
| 221 | 221 | |
| 222 | - function () use ($name, $body, $type) |
|
| 222 | + function() use ($name, $body, $type) |
|
| 223 | 223 | { |
| 224 | 224 | return $this->matchBool($name, $body, $type); |
| 225 | 225 | }, |
| 226 | 226 | |
| 227 | - function () use ($name, $schemaArray, $body, $type) |
|
| 227 | + function() use ($name, $schemaArray, $body, $type) |
|
| 228 | 228 | { |
| 229 | 229 | return $this->matchArray($name, $schemaArray, $body, $type); |
| 230 | 230 | }, |
| 231 | 231 | |
| 232 | - function () use ($name, $schemaArray, $body, $type) |
|
| 232 | + function() use ($name, $schemaArray, $body, $type) |
|
| 233 | 233 | { |
| 234 | 234 | return $this->matchFile($name, $schemaArray, $body, $type); |
| 235 | 235 | }, |
@@ -338,7 +338,7 @@ discard block |
||
| 338 | 338 | return true; |
| 339 | 339 | } |
| 340 | 340 | |
| 341 | - if(!isset($schemaArray['$ref']) && isset($schemaArray['content'])) { |
|
| 341 | + if (!isset($schemaArray['$ref']) && isset($schemaArray['content'])) { |
|
| 342 | 342 | $schemaArray['$ref'] = $schemaArray['content'][key($schemaArray['content'])]['schema']['$ref']; |
| 343 | 343 | } |
| 344 | 344 | |