@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | ]); |
| 69 | 69 | |
| 70 | 70 | $parsedRoute = [ |
| 71 | - 'id' => md5($this->getUri($route).':'.implode($this->getMethods($route))), |
|
| 71 | + 'id' => md5($this->getUri($route) . ':' . implode($this->getMethods($route))), |
|
| 72 | 72 | 'group' => $routeGroup, |
| 73 | 73 | 'title' => $docBlock['short'], |
| 74 | 74 | 'description' => $docBlock['long'], |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | 'cleanQueryParameters' => $this->cleanParams($queryParameters), |
| 82 | 82 | 'authenticated' => $this->getAuthStatusFromDocBlock($docBlock['tags']), |
| 83 | 83 | 'response' => $content, |
| 84 | - 'showresponse' => ! empty($content), |
|
| 84 | + 'showresponse' => !empty($content), |
|
| 85 | 85 | ]; |
| 86 | 86 | $parsedRoute['headers'] = $rulesToApply['headers'] ?? []; |
| 87 | 87 | |
@@ -127,13 +127,13 @@ discard block |
||
| 127 | 127 | protected function getBodyParametersFromDocBlock(array $tags) |
| 128 | 128 | { |
| 129 | 129 | $parameters = collect($tags) |
| 130 | - ->filter(function ($tag) { |
|
| 130 | + ->filter(function($tag) { |
|
| 131 | 131 | return $tag instanceof Tag && $tag->getName() === 'bodyParam'; |
| 132 | 132 | }) |
| 133 | - ->filter(function (Tag $tag) { |
|
| 134 | - return ! $this->shouldExcludeExample($tag); |
|
| 133 | + ->filter(function(Tag $tag) { |
|
| 134 | + return !$this->shouldExcludeExample($tag); |
|
| 135 | 135 | }) |
| 136 | - ->mapWithKeys(function ($tag) { |
|
| 136 | + ->mapWithKeys(function($tag) { |
|
| 137 | 137 | preg_match('/(.+?)\s+(.+?)\s+(required\s+)?(.*)/', $tag->getContent(), $content); |
| 138 | 138 | if (empty($content)) { |
| 139 | 139 | // this means only name and type were supplied |
@@ -205,13 +205,13 @@ discard block |
||
| 205 | 205 | protected function getQueryParametersFromDocBlock(array $tags) |
| 206 | 206 | { |
| 207 | 207 | $parameters = collect($tags) |
| 208 | - ->filter(function ($tag) { |
|
| 208 | + ->filter(function($tag) { |
|
| 209 | 209 | return $tag instanceof Tag && $tag->getName() === 'queryParam'; |
| 210 | 210 | }) |
| 211 | - ->filter(function (Tag $tag) { |
|
| 212 | - return ! $this->shouldExcludeExample($tag); |
|
| 211 | + ->filter(function(Tag $tag) { |
|
| 212 | + return !$this->shouldExcludeExample($tag); |
|
| 213 | 213 | }) |
| 214 | - ->mapWithKeys(function ($tag) { |
|
| 214 | + ->mapWithKeys(function($tag) { |
|
| 215 | 215 | preg_match('/(.+?)\s+(required\s+)?(.*)/', $tag->getContent(), $content); |
| 216 | 216 | if (empty($content)) { |
| 217 | 217 | // this means only name was supplied |
@@ -249,7 +249,7 @@ discard block |
||
| 249 | 249 | protected function getAuthStatusFromDocBlock(array $tags) |
| 250 | 250 | { |
| 251 | 251 | $authTag = collect($tags) |
| 252 | - ->first(function ($tag) { |
|
| 252 | + ->first(function($tag) { |
|
| 253 | 253 | return $tag instanceof Tag && strtolower($tag->getName()) === 'authenticated'; |
| 254 | 254 | }); |
| 255 | 255 | |
@@ -323,25 +323,25 @@ discard block |
||
| 323 | 323 | $faker->seed($this->config->get('faker_seed')); |
| 324 | 324 | } |
| 325 | 325 | $fakeFactories = [ |
| 326 | - 'integer' => function () use ($faker) { |
|
| 326 | + 'integer' => function() use ($faker) { |
|
| 327 | 327 | return $faker->numberBetween(1, 20); |
| 328 | 328 | }, |
| 329 | - 'number' => function () use ($faker) { |
|
| 329 | + 'number' => function() use ($faker) { |
|
| 330 | 330 | return $faker->randomFloat(); |
| 331 | 331 | }, |
| 332 | - 'float' => function () use ($faker) { |
|
| 332 | + 'float' => function() use ($faker) { |
|
| 333 | 333 | return $faker->randomFloat(); |
| 334 | 334 | }, |
| 335 | - 'boolean' => function () use ($faker) { |
|
| 335 | + 'boolean' => function() use ($faker) { |
|
| 336 | 336 | return $faker->boolean(); |
| 337 | 337 | }, |
| 338 | - 'string' => function () use ($faker) { |
|
| 338 | + 'string' => function() use ($faker) { |
|
| 339 | 339 | return $faker->word; |
| 340 | 340 | }, |
| 341 | - 'array' => function () { |
|
| 341 | + 'array' => function() { |
|
| 342 | 342 | return []; |
| 343 | 343 | }, |
| 344 | - 'object' => function () { |
|
| 344 | + 'object' => function() { |
|
| 345 | 345 | return new \stdClass; |
| 346 | 346 | }, |
| 347 | 347 | ]; |