@@ -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 | 'group' => $routeGroup, |
74 | 74 | 'title' => $docBlock['short'], |
75 | 75 | 'description' => $docBlock['long'], |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | 'cleanQueryParameters' => $this->cleanParams($queryParameters), |
85 | 85 | 'authenticated' => $this->getAuthStatusFromDocBlock($docBlock['tags']), |
86 | 86 | 'response' => $content, |
87 | - 'showresponse' => ! empty($content), |
|
87 | + 'showresponse' => !empty($content), |
|
88 | 88 | ]; |
89 | 89 | $parsedRoute['headers'] = $rulesToApply['headers'] ?? []; |
90 | 90 | |
@@ -136,10 +136,10 @@ discard block |
||
136 | 136 | protected function getUriParametersFromDocBlock(array $tags) |
137 | 137 | { |
138 | 138 | $parameters = collect($tags) |
139 | - ->filter(function ($tag) { |
|
139 | + ->filter(function($tag) { |
|
140 | 140 | return $tag instanceof Tag && $tag->getName() === 'uriParam'; |
141 | 141 | }) |
142 | - ->mapWithKeys(function ($tag) { |
|
142 | + ->mapWithKeys(function($tag) { |
|
143 | 143 | preg_match('/(.+?)\s+(.+?)\s+?(.*)/', $tag->getContent(), $content); |
144 | 144 | if (empty($content)) { |
145 | 145 | // this means only name and type were supplied |
@@ -200,10 +200,10 @@ discard block |
||
200 | 200 | protected function getBodyParametersFromDocBlock(array $tags) |
201 | 201 | { |
202 | 202 | $parameters = collect($tags) |
203 | - ->filter(function ($tag) { |
|
203 | + ->filter(function($tag) { |
|
204 | 204 | return $tag instanceof Tag && $tag->getName() === 'bodyParam'; |
205 | 205 | }) |
206 | - ->mapWithKeys(function ($tag) { |
|
206 | + ->mapWithKeys(function($tag) { |
|
207 | 207 | preg_match('/(.+?)\s+(.+?)\s+(required\s+)?(.*)/', $tag->getContent(), $content); |
208 | 208 | if (empty($content)) { |
209 | 209 | // this means only name and type were supplied |
@@ -275,10 +275,10 @@ discard block |
||
275 | 275 | protected function getQueryParametersFromDocBlock(array $tags) |
276 | 276 | { |
277 | 277 | $parameters = collect($tags) |
278 | - ->filter(function ($tag) { |
|
278 | + ->filter(function($tag) { |
|
279 | 279 | return $tag instanceof Tag && $tag->getName() === 'queryParam'; |
280 | 280 | }) |
281 | - ->mapWithKeys(function ($tag) { |
|
281 | + ->mapWithKeys(function($tag) { |
|
282 | 282 | preg_match('/(.+?)\s+(required\s+)?(.*)/', $tag->getContent(), $content); |
283 | 283 | if (empty($content)) { |
284 | 284 | // this means only name was supplied |
@@ -316,7 +316,7 @@ discard block |
||
316 | 316 | protected function getAuthStatusFromDocBlock(array $tags) |
317 | 317 | { |
318 | 318 | $authTag = collect($tags) |
319 | - ->first(function ($tag) { |
|
319 | + ->first(function($tag) { |
|
320 | 320 | return $tag instanceof Tag && strtolower($tag->getName()) === 'authenticated'; |
321 | 321 | }); |
322 | 322 | |
@@ -390,25 +390,25 @@ discard block |
||
390 | 390 | $faker->seed($this->config->get('faker_seed')); |
391 | 391 | } |
392 | 392 | $fakeFactories = [ |
393 | - 'integer' => function () use ($faker) { |
|
393 | + 'integer' => function() use ($faker) { |
|
394 | 394 | return $faker->numberBetween(1, 20); |
395 | 395 | }, |
396 | - 'number' => function () use ($faker) { |
|
396 | + 'number' => function() use ($faker) { |
|
397 | 397 | return $faker->randomFloat(); |
398 | 398 | }, |
399 | - 'float' => function () use ($faker) { |
|
399 | + 'float' => function() use ($faker) { |
|
400 | 400 | return $faker->randomFloat(); |
401 | 401 | }, |
402 | - 'boolean' => function () use ($faker) { |
|
402 | + 'boolean' => function() use ($faker) { |
|
403 | 403 | return $faker->boolean(); |
404 | 404 | }, |
405 | - 'string' => function () use ($faker) { |
|
405 | + 'string' => function() use ($faker) { |
|
406 | 406 | return $faker->word; |
407 | 407 | }, |
408 | - 'array' => function () { |
|
408 | + 'array' => function() { |
|
409 | 409 | return []; |
410 | 410 | }, |
411 | - 'object' => function () { |
|
411 | + 'object' => function() { |
|
412 | 412 | return new \stdClass; |
413 | 413 | }, |
414 | 414 | ]; |