@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | $data = [ |
| 161 | 161 | 'openapi' => '3.0.0', |
| 162 | 162 | 'info' => [ |
| 163 | - 'version' => (string)$version, |
|
| 163 | + 'version' => (string) $version, |
|
| 164 | 164 | 'title' => 'Nette API', |
| 165 | 165 | ], |
| 166 | 166 | 'servers' => [ |
@@ -219,11 +219,11 @@ discard block |
||
| 219 | 219 | 'paths' => $this->getPaths($apis, $baseUrl, $basePath), |
| 220 | 220 | ]; |
| 221 | 221 | |
| 222 | - if (!$securitySchemes) { |
|
| 222 | + if ( ! $securitySchemes) { |
|
| 223 | 223 | unset($data['components']['securitySchemes']); |
| 224 | 224 | } |
| 225 | 225 | |
| 226 | - if (!empty($this->definitions)) { |
|
| 226 | + if ( ! empty($this->definitions)) { |
|
| 227 | 227 | $data['components']['schemas'] = array_merge($this->definitions, $data['components']['schemas']); |
| 228 | 228 | } |
| 229 | 229 | |
@@ -239,7 +239,7 @@ discard block |
||
| 239 | 239 | |
| 240 | 240 | private function getApis(int $version): array |
| 241 | 241 | { |
| 242 | - return array_filter($this->apiDecider->getApis(), function (Api $api) use ($version) { |
|
| 242 | + return array_filter($this->apiDecider->getApis(), function(Api $api) use ($version) { |
|
| 243 | 243 | return $version === $api->getEndpoint()->getVersion(); |
| 244 | 244 | }); |
| 245 | 245 | } |
@@ -299,7 +299,7 @@ discard block |
||
| 299 | 299 | $parameters = $this->createParamsList($handler); |
| 300 | 300 | $requestBody = $this->createRequestBody($handler); |
| 301 | 301 | |
| 302 | - if (!empty($parameters) || !empty($requestBody)) { |
|
| 302 | + if ( ! empty($parameters) || ! empty($requestBody)) { |
|
| 303 | 303 | $responses[IResponse::S400_BAD_REQUEST] = [ |
| 304 | 304 | 'description' => 'Bad request', |
| 305 | 305 | 'content' => [ |
@@ -314,7 +314,7 @@ discard block |
||
| 314 | 314 | |
| 315 | 315 | $authorization = $api->getAuthorization(); |
| 316 | 316 | |
| 317 | - if (!$authorization instanceof NoAuthorization) { |
|
| 317 | + if ( ! $authorization instanceof NoAuthorization) { |
|
| 318 | 318 | $responses[IResponse::S403_FORBIDDEN] = [ |
| 319 | 319 | 'description' => 'Operation forbidden', |
| 320 | 320 | 'content' => [ |
@@ -338,11 +338,11 @@ discard block |
||
| 338 | 338 | ], |
| 339 | 339 | ]; |
| 340 | 340 | |
| 341 | - if (!empty($parameters)) { |
|
| 341 | + if ( ! empty($parameters)) { |
|
| 342 | 342 | $settings['parameters'] = $parameters; |
| 343 | 343 | } |
| 344 | 344 | |
| 345 | - if (!empty($requestBody)) { |
|
| 345 | + if ( ! empty($requestBody)) { |
|
| 346 | 346 | $settings['requestBody'] = $requestBody; |
| 347 | 347 | } |
| 348 | 348 | |
@@ -555,7 +555,7 @@ discard block |
||
| 555 | 555 | } |
| 556 | 556 | } |
| 557 | 557 | |
| 558 | - if (!empty($requestBody['properties'])) { |
|
| 558 | + if ( ! empty($requestBody['properties'])) { |
|
| 559 | 559 | $requestBodySchema = [ |
| 560 | 560 | 'type' => 'object', |
| 561 | 561 | 'properties' => $requestBody['properties'], |
@@ -624,7 +624,7 @@ discard block |
||
| 624 | 624 | { |
| 625 | 625 | $processedRefs = []; |
| 626 | 626 | foreach ($this->transformers as $transformer) { |
| 627 | - if (!method_exists($transformer, 'schema')) { |
|
| 627 | + if ( ! method_exists($transformer, 'schema')) { |
|
| 628 | 628 | continue; |
| 629 | 629 | } |
| 630 | 630 | $stringForReplace = json_encode($this->transformSchema($transformer->schema())); |