@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | // If there's a FormRequest, we check there for @bodyParam tags. |
41 | 41 | if (class_exists(LaravelFormRequest::class) && $parameterClass->isSubclassOf(LaravelFormRequest::class) |
42 | 42 | || class_exists(DingoFormRequest::class) && $parameterClass->isSubclassOf(DingoFormRequest::class) |
43 | - || ! is_null($customFormRequest) && class_exists($customFormRequest) && $parameterClass->isSubclassOf($customFormRequest)) { |
|
43 | + || !is_null($customFormRequest) && class_exists($customFormRequest) && $parameterClass->isSubclassOf($customFormRequest)) { |
|
44 | 44 | $formRequestDocBlock = new DocBlock($parameterClass->getDocComment()); |
45 | 45 | $bodyParametersFromDocBlock = $this->getBodyParametersFromDocBlock($formRequestDocBlock->getTags()); |
46 | 46 | |
@@ -58,10 +58,10 @@ discard block |
||
58 | 58 | private function getBodyParametersFromDocBlock($tags) |
59 | 59 | { |
60 | 60 | $parameters = collect($tags) |
61 | - ->filter(function ($tag) { |
|
61 | + ->filter(function($tag) { |
|
62 | 62 | return $tag instanceof Tag && $tag->getName() === 'bodyParam'; |
63 | 63 | }) |
64 | - ->mapWithKeys(function ($tag) { |
|
64 | + ->mapWithKeys(function($tag) { |
|
65 | 65 | preg_match('/(.+?)\s+(.+?)\s+(required\s+)?(.*)/', $tag->getContent(), $content); |
66 | 66 | $content = preg_replace('/\s?No-example.?/', '', $content); |
67 | 67 | if (empty($content)) { |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | |
82 | 82 | $type = $this->normalizeParameterType($type); |
83 | 83 | list($description, $example) = $this->parseParamDescription($description, $type); |
84 | - $value = is_null($example) && ! $this->shouldExcludeExample($tag) |
|
84 | + $value = is_null($example) && !$this->shouldExcludeExample($tag) |
|
85 | 85 | ? $this->generateDummyValue($type) |
86 | 86 | : $example; |
87 | 87 |