@@ -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 |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | return new OpenApiResponseBody($schema, $name, $structure, $allowNullValues); |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | - throw new GenericSwaggerException("Cannot get instance SwaggerBody or SchemaBody from " . get_class($schema)); |
|
| 81 | + throw new GenericSwaggerException("Cannot get instance SwaggerBody or SchemaBody from ".get_class($schema)); |
|
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | abstract public function match($body); |
@@ -203,32 +203,32 @@ discard block |
||
| 203 | 203 | $nullable = isset($schemaArray['nullable']) ? (bool)$schemaArray['nullable'] : $this->schema->isAllowNullValues(); |
| 204 | 204 | |
| 205 | 205 | $validators = [ |
| 206 | - function () use ($name, $body, $type, $nullable) |
|
| 206 | + function() use ($name, $body, $type, $nullable) |
|
| 207 | 207 | { |
| 208 | 208 | return $this->matchNull($name, $body, $type, $nullable); |
| 209 | 209 | }, |
| 210 | 210 | |
| 211 | - function () use ($name, $schemaArray, $body, $type) |
|
| 211 | + function() use ($name, $schemaArray, $body, $type) |
|
| 212 | 212 | { |
| 213 | 213 | return $this->matchString($name, $schemaArray, $body, $type); |
| 214 | 214 | }, |
| 215 | 215 | |
| 216 | - function () use ($name, $body, $type) |
|
| 216 | + function() use ($name, $body, $type) |
|
| 217 | 217 | { |
| 218 | 218 | return $this->matchNumber($name, $body, $type); |
| 219 | 219 | }, |
| 220 | 220 | |
| 221 | - function () use ($name, $body, $type) |
|
| 221 | + function() use ($name, $body, $type) |
|
| 222 | 222 | { |
| 223 | 223 | return $this->matchBool($name, $body, $type); |
| 224 | 224 | }, |
| 225 | 225 | |
| 226 | - function () use ($name, $schemaArray, $body, $type) |
|
| 226 | + function() use ($name, $schemaArray, $body, $type) |
|
| 227 | 227 | { |
| 228 | 228 | return $this->matchArray($name, $schemaArray, $body, $type); |
| 229 | 229 | }, |
| 230 | 230 | |
| 231 | - function () use ($name, $schemaArray, $body, $type) |
|
| 231 | + function() use ($name, $schemaArray, $body, $type) |
|
| 232 | 232 | { |
| 233 | 233 | return $this->matchFile($name, $schemaArray, $body, $type); |
| 234 | 234 | }, |
@@ -328,7 +328,7 @@ discard block |
||
| 328 | 328 | return true; |
| 329 | 329 | } |
| 330 | 330 | |
| 331 | - if(!isset($schemaArray['$ref']) && isset($schemaArray['content'])) { |
|
| 331 | + if (!isset($schemaArray['$ref']) && isset($schemaArray['content'])) { |
|
| 332 | 332 | $schemaArray['$ref'] = $schemaArray['content'][key($schemaArray['content'])]['schema']['$ref']; |
| 333 | 333 | } |
| 334 | 334 | |