@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | ]); |
| 70 | 70 | |
| 71 | 71 | $parsedRoute = [ |
| 72 | - 'id' => md5($this->getUri($route).':'.implode($this->getMethods($route))), |
|
| 72 | + 'id' => md5($this->getUri($route) . ':' . implode($this->getMethods($route))), |
|
| 73 | 73 | 'groupName' => $routeGroupName, |
| 74 | 74 | 'groupDescription' => $routeGroupDescription, |
| 75 | 75 | 'title' => $docBlock['short'], |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | 'cleanQueryParameters' => $this->cleanParams($queryParameters), |
| 84 | 84 | 'authenticated' => $this->getAuthStatusFromDocBlock($docBlock['tags']), |
| 85 | 85 | 'response' => $content, |
| 86 | - 'showresponse' => ! empty($content), |
|
| 86 | + 'showresponse' => !empty($content), |
|
| 87 | 87 | ]; |
| 88 | 88 | $parsedRoute['headers'] = $rulesToApply['headers'] ?? []; |
| 89 | 89 | |
@@ -129,13 +129,13 @@ discard block |
||
| 129 | 129 | protected function getBodyParametersFromDocBlock(array $tags) |
| 130 | 130 | { |
| 131 | 131 | $parameters = collect($tags) |
| 132 | - ->filter(function ($tag) { |
|
| 132 | + ->filter(function($tag) { |
|
| 133 | 133 | return $tag instanceof Tag && $tag->getName() === 'bodyParam'; |
| 134 | 134 | }) |
| 135 | - ->filter(function (Tag $tag) { |
|
| 136 | - return ! $this->shouldExcludeExample($tag); |
|
| 135 | + ->filter(function(Tag $tag) { |
|
| 136 | + return !$this->shouldExcludeExample($tag); |
|
| 137 | 137 | }) |
| 138 | - ->mapWithKeys(function ($tag) { |
|
| 138 | + ->mapWithKeys(function($tag) { |
|
| 139 | 139 | preg_match('/(.+?)\s+(.+?)\s+(required\s+)?(.*)/', $tag->getContent(), $content); |
| 140 | 140 | if (empty($content)) { |
| 141 | 141 | // this means only name and type were supplied |
@@ -207,13 +207,13 @@ discard block |
||
| 207 | 207 | protected function getQueryParametersFromDocBlock(array $tags) |
| 208 | 208 | { |
| 209 | 209 | $parameters = collect($tags) |
| 210 | - ->filter(function ($tag) { |
|
| 210 | + ->filter(function($tag) { |
|
| 211 | 211 | return $tag instanceof Tag && $tag->getName() === 'queryParam'; |
| 212 | 212 | }) |
| 213 | - ->filter(function (Tag $tag) { |
|
| 214 | - return ! $this->shouldExcludeExample($tag); |
|
| 213 | + ->filter(function(Tag $tag) { |
|
| 214 | + return !$this->shouldExcludeExample($tag); |
|
| 215 | 215 | }) |
| 216 | - ->mapWithKeys(function ($tag) { |
|
| 216 | + ->mapWithKeys(function($tag) { |
|
| 217 | 217 | preg_match('/(.+?)\s+(required\s+)?(.*)/', $tag->getContent(), $content); |
| 218 | 218 | if (empty($content)) { |
| 219 | 219 | // this means only name was supplied |
@@ -251,7 +251,7 @@ discard block |
||
| 251 | 251 | protected function getAuthStatusFromDocBlock(array $tags) |
| 252 | 252 | { |
| 253 | 253 | $authTag = collect($tags) |
| 254 | - ->first(function ($tag) { |
|
| 254 | + ->first(function($tag) { |
|
| 255 | 255 | return $tag instanceof Tag && strtolower($tag->getName()) === 'authenticated'; |
| 256 | 256 | }); |
| 257 | 257 | |
@@ -334,25 +334,25 @@ discard block |
||
| 334 | 334 | $faker->seed($this->config->get('faker_seed')); |
| 335 | 335 | } |
| 336 | 336 | $fakeFactories = [ |
| 337 | - 'integer' => function () use ($faker) { |
|
| 337 | + 'integer' => function() use ($faker) { |
|
| 338 | 338 | return $faker->numberBetween(1, 20); |
| 339 | 339 | }, |
| 340 | - 'number' => function () use ($faker) { |
|
| 340 | + 'number' => function() use ($faker) { |
|
| 341 | 341 | return $faker->randomFloat(); |
| 342 | 342 | }, |
| 343 | - 'float' => function () use ($faker) { |
|
| 343 | + 'float' => function() use ($faker) { |
|
| 344 | 344 | return $faker->randomFloat(); |
| 345 | 345 | }, |
| 346 | - 'boolean' => function () use ($faker) { |
|
| 346 | + 'boolean' => function() use ($faker) { |
|
| 347 | 347 | return $faker->boolean(); |
| 348 | 348 | }, |
| 349 | - 'string' => function () use ($faker) { |
|
| 349 | + 'string' => function() use ($faker) { |
|
| 350 | 350 | return $faker->word; |
| 351 | 351 | }, |
| 352 | - 'array' => function () { |
|
| 352 | + 'array' => function() { |
|
| 353 | 353 | return []; |
| 354 | 354 | }, |
| 355 | - 'object' => function () { |
|
| 355 | + 'object' => function() { |
|
| 356 | 356 | return new \stdClass; |
| 357 | 357 | }, |
| 358 | 358 | ]; |