@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | $data = [ |
149 | 149 | 'openapi' => '3.0.0', |
150 | 150 | 'info' => [ |
151 | - 'version' => (string)$version, |
|
151 | + 'version' => (string) $version, |
|
152 | 152 | 'title' => 'Nette API', |
153 | 153 | ], |
154 | 154 | 'servers' => [ |
@@ -207,11 +207,11 @@ discard block |
||
207 | 207 | 'paths' => $this->getPaths($apis, $baseUrl, $basePath), |
208 | 208 | ]; |
209 | 209 | |
210 | - if (!$securitySchemes) { |
|
210 | + if ( ! $securitySchemes) { |
|
211 | 211 | unset($data['components']['securitySchemes']); |
212 | 212 | } |
213 | 213 | |
214 | - if (!empty($this->definitions)) { |
|
214 | + if ( ! empty($this->definitions)) { |
|
215 | 215 | $data['components']['schemas'] = array_merge($this->definitions, $data['components']['schemas']); |
216 | 216 | } |
217 | 217 | |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | |
226 | 226 | private function getApis(int $version): array |
227 | 227 | { |
228 | - return array_filter($this->apiDecider->getApis(), function (Api $api) use ($version) { |
|
228 | + return array_filter($this->apiDecider->getApis(), function(Api $api) use ($version) { |
|
229 | 229 | return $version === $api->getEndpoint()->getVersion(); |
230 | 230 | }); |
231 | 231 | } |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | $parameters = $this->createParamsList($handler); |
286 | 286 | $requestBody = $this->createRequestBody($handler); |
287 | 287 | |
288 | - if (!empty($parameters) || !empty($requestBody)) { |
|
288 | + if ( ! empty($parameters) || ! empty($requestBody)) { |
|
289 | 289 | $responses[IResponse::S400_BAD_REQUEST] = [ |
290 | 290 | 'description' => 'Bad request', |
291 | 291 | 'content' => [ |
@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | |
301 | 301 | $authorization = $api->getAuthorization(); |
302 | 302 | |
303 | - if (!$authorization instanceof NoAuthorization) { |
|
303 | + if ( ! $authorization instanceof NoAuthorization) { |
|
304 | 304 | $responses[IResponse::S403_FORBIDDEN] = [ |
305 | 305 | 'description' => 'Operation forbidden', |
306 | 306 | 'content' => [ |
@@ -324,11 +324,11 @@ discard block |
||
324 | 324 | ], |
325 | 325 | ]; |
326 | 326 | |
327 | - if (!empty($parameters)) { |
|
327 | + if ( ! empty($parameters)) { |
|
328 | 328 | $settings['parameters'] = $parameters; |
329 | 329 | } |
330 | 330 | |
331 | - if (!empty($requestBody)) { |
|
331 | + if ( ! empty($requestBody)) { |
|
332 | 332 | $settings['requestBody'] = $requestBody; |
333 | 333 | } |
334 | 334 | |
@@ -512,7 +512,7 @@ discard block |
||
512 | 512 | } |
513 | 513 | } |
514 | 514 | |
515 | - if (!empty($requestBody['properties'])) { |
|
515 | + if ( ! empty($requestBody['properties'])) { |
|
516 | 516 | $requestBodySchema = [ |
517 | 517 | 'type' => 'object', |
518 | 518 | 'properties' => $requestBody['properties'], |