@@ -43,7 +43,7 @@ |
||
| 43 | 43 | * |
| 44 | 44 | * @var string |
| 45 | 45 | */ |
| 46 | - private const MESSAGE_TAG_MIXED_TYPE = 'We suggest that you avoid the "mixed" type and declare the ' . |
|
| 46 | + private const MESSAGE_TAG_MIXED_TYPE = 'We suggest that you avoid the "mixed" type and declare the '. |
|
| 47 | 47 | 'required types in detail.'; |
| 48 | 48 | |
| 49 | 49 | /** |
@@ -328,7 +328,7 @@ |
||
| 328 | 328 | ); |
| 329 | 329 | |
| 330 | 330 | if ($sniffName) { |
| 331 | - $sniffFQCN .= '.' . $sniffName; |
|
| 331 | + $sniffFQCN .= '.'.$sniffName; |
|
| 332 | 332 | } |
| 333 | 333 | |
| 334 | 334 | return $sniffFQCN; |
@@ -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 | } |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | * |
| 95 | 95 | * @var string |
| 96 | 96 | */ |
| 97 | - private const MESSAGE_TAG_MIXED_TYPE = 'We suggest that you avoid the "mixed" type and declare the ' . |
|
| 97 | + private const MESSAGE_TAG_MIXED_TYPE = 'We suggest that you avoid the "mixed" type and declare the '. |
|
| 98 | 98 | 'required types in detail.'; |
| 99 | 99 | |
| 100 | 100 | /** |
@@ -217,7 +217,7 @@ discard block |
||
| 217 | 217 | { |
| 218 | 218 | $varOfThisTag = $this->getArgumentTokenOfTag(); |
| 219 | 219 | |
| 220 | - return '/(?P<type>[\w|\|\[\]]*) ?(?P<var>' . preg_quote($varOfThisTag['content'], '/') . |
|
| 220 | + return '/(?P<type>[\w|\|\[\]]*) ?(?P<var>'.preg_quote($varOfThisTag['content'], '/'). |
|
| 221 | 221 | ') ?(?P<desc>.*)/m'; |
| 222 | 222 | } |
| 223 | 223 | |
@@ -254,7 +254,7 @@ discard block |
||
| 254 | 254 | ))->setToken($this->token); |
| 255 | 255 | } |
| 256 | 256 | |
| 257 | - $this->varTokens = array_filter($this->tokens, function (array $token) use ($varPositions): bool { |
|
| 257 | + $this->varTokens = array_filter($this->tokens, function(array $token) use ($varPositions): bool { |
|
| 258 | 258 | return in_array($token['pointer'], $varPositions, true); |
| 259 | 259 | }); |
| 260 | 260 | |
@@ -276,7 +276,7 @@ discard block |
||
| 276 | 276 | $this->stackPos - 1 |
| 277 | 277 | ); |
| 278 | 278 | |
| 279 | - $tagPosBeforeThis = array_filter($tagPosBeforeThis, function (int $position) { |
|
| 279 | + $tagPosBeforeThis = array_filter($tagPosBeforeThis, function(int $position) { |
|
| 280 | 280 | return $this->tokens[$position]['content'] === '@param'; |
| 281 | 281 | }); |
| 282 | 282 | |