@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | array_walk( |
98 | 98 | $allTags, |
99 | 99 | // TODO: Removed Duplicates |
100 | - function (array $tag, int $tagPos) use (&$checkedTags, $tagRules): void { |
|
100 | + function(array $tag, int $tagPos) use (&$checkedTags, $tagRules): void { |
|
101 | 101 | $tagContent = substr($tag['content'], 1); |
102 | 102 | |
103 | 103 | if (!in_array($tagContent, $checkedTags)) { |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | $tagPos, |
113 | 113 | // We use an error code containing the tag name because we can't configure this rules from |
114 | 114 | // the outside and need specific code to exclude the rule for this special tag. |
115 | - self::CODE_TAG_OCCURRENCE_MAX_PREFIX . ucfirst($tagContent), |
|
115 | + self::CODE_TAG_OCCURRENCE_MAX_PREFIX.ucfirst($tagContent), |
|
116 | 116 | [ |
117 | 117 | $tagContent, |
118 | 118 | $maxCount, |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | |
139 | 139 | array_walk( |
140 | 140 | $rulesWithReq, |
141 | - function (array $tagRule, string $tag) use ($checkedRule, &$checkedTags): void { |
|
141 | + function(array $tagRule, string $tag) use ($checkedRule, &$checkedTags): void { |
|
142 | 142 | $minCount = $tagRule[$checkedRule]; |
143 | 143 | $tagCount = count($this->findTokensForTag($tag)); |
144 | 144 | |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | $this->getDocCommentPos(), |
149 | 149 | // We use an error code containing the tag name because we can't configure this rules from the |
150 | 150 | // outside and need specific code to exclude the rule for this special tag. |
151 | - self::CODE_TAG_OCCURRENCE_MIN_PREFIX . ucfirst($tag), |
|
151 | + self::CODE_TAG_OCCURRENCE_MIN_PREFIX.ucfirst($tag), |
|
152 | 152 | [ |
153 | 153 | $tag, |
154 | 154 | $minCount, |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | { |
172 | 172 | $allTags = $this->getAllTags(); |
173 | 173 | |
174 | - return array_filter($allTags, function (array $tag) use ($tagName): bool { |
|
174 | + return array_filter($allTags, function(array $tag) use ($tagName): bool { |
|
175 | 175 | return substr($tag['content'], 1) === $tagName; |
176 | 176 | }); |
177 | 177 | } |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | { |
216 | 216 | $processedTagRules = $this->getProcessedTagRules(); |
217 | 217 | |
218 | - $processedTagRules = array_filter($processedTagRules, function (array $tagRule) use ($requiredRule): bool { |
|
218 | + $processedTagRules = array_filter($processedTagRules, function(array $tagRule) use ($requiredRule): bool { |
|
219 | 219 | return array_key_exists($requiredRule, $tagRule); |
220 | 220 | }); |
221 | 221 | return $processedTagRules; |
@@ -254,8 +254,8 @@ discard block |
||
254 | 254 | { |
255 | 255 | $processedTagRules = $this->getTagRules(); |
256 | 256 | |
257 | - array_walk($processedTagRules, function (&$tagRule) { |
|
258 | - $tagRule = array_map(function ($valueOrCallback) { |
|
257 | + array_walk($processedTagRules, function(&$tagRule) { |
|
258 | + $tagRule = array_map(function($valueOrCallback) { |
|
259 | 259 | return is_callable($valueOrCallback, true) |
260 | 260 | ? Closure::fromCallable($valueOrCallback)->call($this) |
261 | 261 | : $valueOrCallback; |
@@ -26,7 +26,7 @@ |
||
26 | 26 | * |
27 | 27 | * @var string |
28 | 28 | */ |
29 | - private const MESSAGE_TAG_MISSING_DATES = 'Please provide the version since when its deprecated and when it will ' . |
|
29 | + private const MESSAGE_TAG_MISSING_DATES = 'Please provide the version since when its deprecated and when it will '. |
|
30 | 30 | 'be removed (Pattern: %s).'; |
31 | 31 | |
32 | 32 | /** |
@@ -41,7 +41,7 @@ |
||
41 | 41 | { |
42 | 42 | $this->file->getFixer()->replaceToken( |
43 | 43 | TokenHelper::findNext($this->file->getBaseFile(), [T_DOC_COMMENT_STRING], $this->stackPos), |
44 | - ' ' . $currentNamespace |
|
44 | + ' '.$currentNamespace |
|
45 | 45 | ); |
46 | 46 | } |
47 | 47 |
@@ -97,7 +97,7 @@ |
||
97 | 97 | protected function processTagContent(?string $tagContent = null): void |
98 | 98 | { |
99 | 99 | if (!$this->isValidContent($tagContent)) { |
100 | - $this->file->{'add' . ($this->asError() ? 'Error' : 'Warning')}(...$this->getReportData($tagContent)); |
|
100 | + $this->file->{'add'.($this->asError() ? 'Error' : 'Warning')}(...$this->getReportData($tagContent)); |
|
101 | 101 | } |
102 | 102 | } |
103 | 103 | } |
@@ -56,7 +56,7 @@ |
||
56 | 56 | */ |
57 | 57 | protected function isValidContent(?string $tagContent = null, ?callable $callback = null): bool |
58 | 58 | { |
59 | - return $this->isValidContentInTrait($tagContent, function (array $matches): bool { |
|
59 | + return $this->isValidContentInTrait($tagContent, function(array $matches): bool { |
|
60 | 60 | return (bool) filter_var($matches['mail'], FILTER_VALIDATE_EMAIL); |
61 | 61 | }); |
62 | 62 | } |
@@ -175,24 +175,24 @@ discard block |
||
175 | 175 | |
176 | 176 | // Insert new line between groups. |
177 | 177 | if ($isGroupSwitch) { |
178 | - $newContent .= $lineStartingPadding . '*' . $eolChar; |
|
178 | + $newContent .= $lineStartingPadding.'*'.$eolChar; |
|
179 | 179 | } |
180 | 180 | |
181 | 181 | // Create the new Tag. |
182 | 182 | // WARNING We do not a line break in the tag summary. |
183 | - $newContent .= $lineStartingPadding . '* ' . |
|
183 | + $newContent .= $lineStartingPadding.'* '. |
|
184 | 184 | // Remove the "ending" whitespace if there are no more contents |
185 | 185 | trim( |
186 | - $thisTagContent . ' ' . |
|
186 | + $thisTagContent.' '. |
|
187 | 187 | implode(' ', array_column($tag['contents'] ?? [], 'content')) |
188 | - ) . |
|
188 | + ). |
|
189 | 189 | $eolChar; |
190 | 190 | |
191 | 191 | $prevTagContent = $thisTagContent; |
192 | 192 | $withReturn = $isReturn; |
193 | 193 | } |
194 | 194 | |
195 | - $newContent .= $lineStartingPadding . '*/' . $eolChar; |
|
195 | + $newContent .= $lineStartingPadding.'*/'.$eolChar; |
|
196 | 196 | |
197 | 197 | return $newContent; |
198 | 198 | } |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | |
245 | 245 | $fixer->addContentBefore( |
246 | 246 | $token['pointer'], |
247 | - $this->file->getEolChar() . $lineStartPadding . '* ' |
|
247 | + $this->file->getEolChar().$lineStartPadding.'* ' |
|
248 | 248 | ); |
249 | 249 | |
250 | 250 | $fixer->endChangeset(); |
@@ -336,7 +336,7 @@ discard block |
||
336 | 336 | { |
337 | 337 | $tagCounts = $this->docTagHelper->getTagCounts($tokens); |
338 | 338 | |
339 | - usort($tokens, function (array $leftToken, array $rightToken) use ($tagCounts): int { |
|
339 | + usort($tokens, function(array $leftToken, array $rightToken) use ($tagCounts): int { |
|
340 | 340 | $return = 0; |
341 | 341 | $leftTagName = $leftToken['content']; |
342 | 342 | $rightTagName = $rightToken['content']; |
@@ -173,13 +173,13 @@ discard block |
||
173 | 173 | $this->stackPos - 1 |
174 | 174 | ); |
175 | 175 | |
176 | - $tagPositionsBeforeThis = array_filter($tagPositionsBeforeThis, function (int $position) { |
|
176 | + $tagPositionsBeforeThis = array_filter($tagPositionsBeforeThis, function(int $position) { |
|
177 | 177 | return $this->tokens[$position]['content'] === '@param'; |
178 | 178 | }); |
179 | 179 | |
180 | 180 | $varOfThisTag = array_values($this->varTokens)[count($tagPositionsBeforeThis)]; |
181 | 181 | |
182 | - return '/(?P<type>[\w|\|\[\]]*) ?(?P<var>' . preg_quote($varOfThisTag['content'], '/') . |
|
182 | + return '/(?P<type>[\w|\|\[\]]*) ?(?P<var>'.preg_quote($varOfThisTag['content'], '/'). |
|
183 | 183 | ') ?(?P<desc>.*)/m'; |
184 | 184 | } |
185 | 185 | |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | ->setToken($this->token); |
201 | 201 | } |
202 | 202 | |
203 | - $this->varTokens = array_filter($this->tokens, function (array $token) use ($varPositions): bool { |
|
203 | + $this->varTokens = array_filter($this->tokens, function(array $token) use ($varPositions): bool { |
|
204 | 204 | return in_array($token['pointer'], $varPositions, true); |
205 | 205 | }); |
206 | 206 |