@@ -300,7 +300,7 @@ |
||
300 | 300 | |
301 | 301 | $this->file->getFixer()->addContent( |
302 | 302 | $descEndPtr, |
303 | - $this->file->getEolChar() . str_repeat(' ', $descEndToken['level']) . ' *' |
|
303 | + $this->file->getEolChar().str_repeat(' ', $descEndToken['level']).' *' |
|
304 | 304 | ); |
305 | 305 | |
306 | 306 | $this->file->getFixer()->endChangeset(); |
@@ -113,7 +113,7 @@ |
||
113 | 113 | * @param string $error The error message. |
114 | 114 | * @param int $stackPtr The stack position where the error occurred. |
115 | 115 | * @param string $code A violation code unique to the sniff message. |
116 | - * @param array $data Replacements for the error message. |
|
116 | + * @param string[] $data Replacements for the error message. |
|
117 | 117 | * @param int $severity The severity level for this error. A value of 0 |
118 | 118 | * will be converted into the default severity level. |
119 | 119 | * |
@@ -762,7 +762,7 @@ |
||
762 | 762 | { |
763 | 763 | $baseProps = get_object_vars($baseFile); |
764 | 764 | |
765 | - array_walk($baseProps, function ($value, $key) { |
|
765 | + array_walk($baseProps, function($value, $key) { |
|
766 | 766 | $this->$key = $value; |
767 | 767 | }); |
768 | 768 | } |
@@ -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']; |
@@ -59,7 +59,7 @@ |
||
59 | 59 | // Satisfy php md |
60 | 60 | unset($callback); |
61 | 61 | |
62 | - return $this->isValidContentInTrait($tagContent, function (array $matches): bool { |
|
62 | + return $this->isValidContentInTrait($tagContent, function(array $matches): bool { |
|
63 | 63 | return (bool) filter_var($matches['mail'], FILTER_VALIDATE_EMAIL); |
64 | 64 | }); |
65 | 65 | } |
@@ -127,7 +127,7 @@ |
||
127 | 127 | |
128 | 128 | $this->file->fixer->addContent( |
129 | 129 | $position, |
130 | - $this->file->getEolChar() . str_repeat(' ', $token['level']) . ' *' |
|
130 | + $this->file->getEolChar().str_repeat(' ', $token['level']).' *' |
|
131 | 131 | ); |
132 | 132 | |
133 | 133 | $this->file->fixer->endChangeset(); |
@@ -105,12 +105,12 @@ discard block |
||
105 | 105 | $file->fixer->beginChangeset(); |
106 | 106 | |
107 | 107 | if ($this->isCustomArrayType($returnTypeHint)) { |
108 | - $returnTypeHint = ($returnTypeHint[0] === '?' ? '?' : '') . 'array'; |
|
108 | + $returnTypeHint = ($returnTypeHint[0] === '?' ? '?' : '').'array'; |
|
109 | 109 | } |
110 | 110 | |
111 | 111 | $file->fixer->addContent( |
112 | 112 | $this->token['parenthesis_closer'], |
113 | - ': ' . $returnTypeHint |
|
113 | + ': '.$returnTypeHint |
|
114 | 114 | ); |
115 | 115 | |
116 | 116 | $file->fixer->endChangeset(); |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | |
147 | 147 | // We add the question mark if there is a nullable type. |
148 | 148 | if (in_array($type, self::NULL_TYPES, true) && ($typeCount > 1)) { |
149 | - $returnTypeHint = '?' . $returnTypeHint; |
|
149 | + $returnTypeHint = '?'.$returnTypeHint; |
|
150 | 150 | continue; // We still need this continue to prevent further execution of the questionmark. |
151 | 151 | } |
152 | 152 | |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | */ |
289 | 289 | private function loadFixableTypes(?array $returnTypes): array |
290 | 290 | { |
291 | - return array_filter($returnTypes ?? [], function (string $returnType): bool { |
|
291 | + return array_filter($returnTypes ?? [], function(string $returnType): bool { |
|
292 | 292 | return $this->isFixableReturnType($returnType); |
293 | 293 | }); |
294 | 294 | } |
@@ -105,7 +105,7 @@ |
||
105 | 105 | protected function processTagContent(?string $tagContent = null): void |
106 | 106 | { |
107 | 107 | if (!$this->isValidContent($tagContent)) { |
108 | - $this->getFile()->{'add' . ($this->asError() ? 'Error' : 'Warning')}(...$this->getReportData($tagContent)); |
|
108 | + $this->getFile()->{'add'.($this->asError() ? 'Error' : 'Warning')}(...$this->getReportData($tagContent)); |
|
109 | 109 | } |
110 | 110 | } |
111 | 111 | } |
@@ -22,7 +22,7 @@ |
||
22 | 22 | /** |
23 | 23 | * The message for the error. |
24 | 24 | */ |
25 | - private const MESSAGE_TAG_MISSING_DATES = 'Please provide the version since when its deprecated and when it will ' . |
|
25 | + private const MESSAGE_TAG_MISSING_DATES = 'Please provide the version since when its deprecated and when it will '. |
|
26 | 26 | 'be removed (Pattern: %s).'; |
27 | 27 | |
28 | 28 | /** |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | /** |
75 | 75 | * The message for the mixed type warning. |
76 | 76 | */ |
77 | - private const MESSAGE_TAG_MIXED_TYPE = 'We suggest that you avoid the "mixed" type and declare the ' . |
|
77 | + private const MESSAGE_TAG_MIXED_TYPE = 'We suggest that you avoid the "mixed" type and declare the '. |
|
78 | 78 | 'required types in detail.'; |
79 | 79 | |
80 | 80 | /** |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | { |
198 | 198 | $varOfThisTag = $this->getArgumentTokenOfTag(); |
199 | 199 | |
200 | - return '/(?P<type>[\w|\|\[\]]*) ?(?P<var>' . preg_quote($varOfThisTag['content'], '/') . |
|
200 | + return '/(?P<type>[\w|\|\[\]]*) ?(?P<var>'.preg_quote($varOfThisTag['content'], '/'). |
|
201 | 201 | ') ?(?P<desc>.*)/m'; |
202 | 202 | } |
203 | 203 | |
@@ -234,7 +234,7 @@ discard block |
||
234 | 234 | ))->setToken($this->token); |
235 | 235 | } |
236 | 236 | |
237 | - $this->varTokens = array_filter($this->tokens, function (array $token) use ($varPositions): bool { |
|
237 | + $this->varTokens = array_filter($this->tokens, function(array $token) use ($varPositions): bool { |
|
238 | 238 | return in_array($token['pointer'], $varPositions, true); |
239 | 239 | }); |
240 | 240 | |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | $this->stackPos - 1 |
257 | 257 | ); |
258 | 258 | |
259 | - $tagPosBeforeThis = array_filter($tagPosBeforeThis, function (int $position) { |
|
259 | + $tagPosBeforeThis = array_filter($tagPosBeforeThis, function(int $position) { |
|
260 | 260 | return $this->tokens[$position]['content'] === '@param'; |
261 | 261 | }); |
262 | 262 |