@@ -18,13 +18,13 @@ discard block |
||
| 18 | 18 | protected $jsonFile; |
| 19 | 19 | protected $allowNullValues; |
| 20 | 20 | |
| 21 | - const SWAGGER_PATHS="paths"; |
|
| 22 | - const SWAGGER_PARAMETERS="parameters"; |
|
| 21 | + const SWAGGER_PATHS = "paths"; |
|
| 22 | + const SWAGGER_PARAMETERS = "parameters"; |
|
| 23 | 23 | |
| 24 | 24 | public function __construct($jsonFile, $allowNullValues = false) |
| 25 | 25 | { |
| 26 | 26 | $this->jsonFile = json_decode($jsonFile, true); |
| 27 | - $this->allowNullValues = (bool) $allowNullValues; |
|
| 27 | + $this->allowNullValues = (bool)$allowNullValues; |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | public function getHttpSchema() |
@@ -185,6 +185,6 @@ discard block |
||
| 185 | 185 | */ |
| 186 | 186 | public function setAllowNullValues($value) |
| 187 | 187 | { |
| 188 | - $this->allowNullValues = (bool) $value; |
|
| 188 | + $this->allowNullValues = (bool)$value; |
|
| 189 | 189 | } |
| 190 | 190 | } |
@@ -8,8 +8,8 @@ discard block |
||
| 8 | 8 | |
| 9 | 9 | abstract class SwaggerBody |
| 10 | 10 | { |
| 11 | - const SWAGGER_PROPERTIES="properties"; |
|
| 12 | - const SWAGGER_REQUIRED="required"; |
|
| 11 | + const SWAGGER_PROPERTIES = "properties"; |
|
| 12 | + const SWAGGER_REQUIRED = "required"; |
|
| 13 | 13 | |
| 14 | 14 | /** |
| 15 | 15 | * @var \ByJG\Swagger\SwaggerSchema |
@@ -146,27 +146,27 @@ discard block |
||
| 146 | 146 | $type = $schema['type']; |
| 147 | 147 | |
| 148 | 148 | $validators = [ |
| 149 | - function () use ($name, $body, $type) |
|
| 149 | + function() use ($name, $body, $type) |
|
| 150 | 150 | { |
| 151 | 151 | return $this->matchNull($name, $body, $type); |
| 152 | 152 | }, |
| 153 | 153 | |
| 154 | - function () use ($name, $schema, $body, $type) |
|
| 154 | + function() use ($name, $schema, $body, $type) |
|
| 155 | 155 | { |
| 156 | 156 | return $this->matchString($name, $schema, $body, $type); |
| 157 | 157 | }, |
| 158 | 158 | |
| 159 | - function () use ($name, $body, $type) |
|
| 159 | + function() use ($name, $body, $type) |
|
| 160 | 160 | { |
| 161 | 161 | return $this->matchNumber($name, $body, $type); |
| 162 | 162 | }, |
| 163 | 163 | |
| 164 | - function () use ($name, $body, $type) |
|
| 164 | + function() use ($name, $body, $type) |
|
| 165 | 165 | { |
| 166 | 166 | return $this->matchBool($name, $body, $type); |
| 167 | 167 | }, |
| 168 | 168 | |
| 169 | - function () use ($name, $schema, $body, $type) |
|
| 169 | + function() use ($name, $schema, $body, $type) |
|
| 170 | 170 | { |
| 171 | 171 | return $this->matchArray($name, $schema, $body, $type); |
| 172 | 172 | } |