@@ -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 | 'groupName' => $routeGroupName, |
73 | 73 | 'groupDescription' => $routeGroupDescription, |
74 | 74 | 'title' => $routeTitle ?: $docBlock['short'], |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | 'cleanQueryParameters' => $this->cleanParams($queryParameters), |
83 | 83 | 'authenticated' => $this->getAuthStatusFromDocBlock($docBlock['tags']), |
84 | 84 | 'response' => $content, |
85 | - 'showresponse' => ! empty($content), |
|
85 | + 'showresponse' => !empty($content), |
|
86 | 86 | ]; |
87 | 87 | $parsedRoute['headers'] = $rulesToApply['headers'] ?? []; |
88 | 88 | |
@@ -128,10 +128,10 @@ discard block |
||
128 | 128 | protected function getBodyParametersFromDocBlock(array $tags) |
129 | 129 | { |
130 | 130 | $parameters = collect($tags) |
131 | - ->filter(function ($tag) { |
|
131 | + ->filter(function($tag) { |
|
132 | 132 | return $tag instanceof Tag && $tag->getName() === 'bodyParam'; |
133 | 133 | }) |
134 | - ->mapWithKeys(function ($tag) { |
|
134 | + ->mapWithKeys(function($tag) { |
|
135 | 135 | preg_match('/(.+?)\s+(.+?)\s+(required\s+)?(.*)/', $tag->getContent(), $content); |
136 | 136 | if (empty($content)) { |
137 | 137 | // this means only name and type were supplied |
@@ -203,10 +203,10 @@ discard block |
||
203 | 203 | protected function getQueryParametersFromDocBlock(array $tags) |
204 | 204 | { |
205 | 205 | $parameters = collect($tags) |
206 | - ->filter(function ($tag) { |
|
206 | + ->filter(function($tag) { |
|
207 | 207 | return $tag instanceof Tag && $tag->getName() === 'queryParam'; |
208 | 208 | }) |
209 | - ->mapWithKeys(function ($tag) { |
|
209 | + ->mapWithKeys(function($tag) { |
|
210 | 210 | preg_match('/(.+?)\s+(required\s+)?(.*)/', $tag->getContent(), $content); |
211 | 211 | if (empty($content)) { |
212 | 212 | // this means only name was supplied |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | protected function getAuthStatusFromDocBlock(array $tags) |
245 | 245 | { |
246 | 246 | $authTag = collect($tags) |
247 | - ->first(function ($tag) { |
|
247 | + ->first(function($tag) { |
|
248 | 248 | return $tag instanceof Tag && strtolower($tag->getName()) === 'authenticated'; |
249 | 249 | }); |
250 | 250 | |
@@ -277,7 +277,7 @@ discard block |
||
277 | 277 | protected function getRouteGroup(ReflectionClass $controller, array $methodDocBlock) |
278 | 278 | { |
279 | 279 | // @group tag on the method overrides that on the controller |
280 | - if (! empty($methodDocBlock['tags'])) { |
|
280 | + if (!empty($methodDocBlock['tags'])) { |
|
281 | 281 | foreach ($methodDocBlock['tags'] as $tag) { |
282 | 282 | if ($tag->getName() === 'group') { |
283 | 283 | $routeGroupParts = explode("\n", trim($tag->getContent())); |
@@ -344,25 +344,25 @@ discard block |
||
344 | 344 | $faker->seed($this->config->get('faker_seed')); |
345 | 345 | } |
346 | 346 | $fakeFactories = [ |
347 | - 'integer' => function () use ($faker) { |
|
347 | + 'integer' => function() use ($faker) { |
|
348 | 348 | return $faker->numberBetween(1, 20); |
349 | 349 | }, |
350 | - 'number' => function () use ($faker) { |
|
350 | + 'number' => function() use ($faker) { |
|
351 | 351 | return $faker->randomFloat(); |
352 | 352 | }, |
353 | - 'float' => function () use ($faker) { |
|
353 | + 'float' => function() use ($faker) { |
|
354 | 354 | return $faker->randomFloat(); |
355 | 355 | }, |
356 | - 'boolean' => function () use ($faker) { |
|
356 | + 'boolean' => function() use ($faker) { |
|
357 | 357 | return $faker->boolean(); |
358 | 358 | }, |
359 | - 'string' => function () use ($faker) { |
|
359 | + 'string' => function() use ($faker) { |
|
360 | 360 | return $faker->word; |
361 | 361 | }, |
362 | - 'array' => function () { |
|
362 | + 'array' => function() { |
|
363 | 363 | return []; |
364 | 364 | }, |
365 | - 'object' => function () { |
|
365 | + 'object' => function() { |
|
366 | 366 | return new \stdClass; |
367 | 367 | }, |
368 | 368 | ]; |