@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | $jsonFile = json_decode($jsonFile, true); |
| 18 | 18 | } |
| 19 | 19 | $this->jsonFile = $jsonFile; |
| 20 | - $this->allowNullValues = (bool) $allowNullValues; |
|
| 20 | + $this->allowNullValues = (bool)$allowNullValues; |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | public function getHttpSchema() |
@@ -102,6 +102,6 @@ discard block |
||
| 102 | 102 | */ |
| 103 | 103 | public function setAllowNullValues($value) |
| 104 | 104 | { |
| 105 | - $this->allowNullValues = (bool) $value; |
|
| 105 | + $this->allowNullValues = (bool)$value; |
|
| 106 | 106 | } |
| 107 | 107 | } |
@@ -11,8 +11,8 @@ discard block |
||
| 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 |
||
| 150 | 150 | $nullable = isset($schema['nullable']) ? (bool)$schema['nullable'] : $this->swaggerSchema->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 |
||
| 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 | |
@@ -10,7 +10,6 @@ |
||
| 10 | 10 | use ByJG\ApiTools\Exception\NotMatchedException; |
| 11 | 11 | use ByJG\ApiTools\Exception\PathNotFoundException; |
| 12 | 12 | use ByJG\ApiTools\Exception\StatusCodeNotMatchedException; |
| 13 | -use ByJG\ApiTools\Exception\GenericSwaggerException; |
|
| 14 | 13 | use GuzzleHttp\GuzzleException; |
| 15 | 14 | use PHPUnit\Framework\TestCase; |
| 16 | 15 | |