@@ -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(); |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | private function checkForFluentSetterErrors(File $phpcsFile, int $functionPos, int $classPos): void |
| 108 | 108 | { |
| 109 | 109 | $tokens = $phpcsFile->getTokens(); |
| 110 | - $errorData = $phpcsFile->getDeclarationName($classPos) . '::' . $phpcsFile->getDeclarationName($functionPos); |
|
| 110 | + $errorData = $phpcsFile->getDeclarationName($classPos).'::'.$phpcsFile->getDeclarationName($functionPos); |
|
| 111 | 111 | |
| 112 | 112 | $functionToken = $tokens[$functionPos]; |
| 113 | 113 | $openBracePtr = $functionToken['scope_opener']; |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | ); |
| 150 | 150 | |
| 151 | 151 | if ($sniffName) { |
| 152 | - $sniffFQCN .= '.' . $sniffName; |
|
| 152 | + $sniffFQCN .= '.'.$sniffName; |
|
| 153 | 153 | } |
| 154 | 154 | |
| 155 | 155 | return $sniffFQCN; |
@@ -224,7 +224,7 @@ discard block |
||
| 224 | 224 | |
| 225 | 225 | $phpcsFile->fixer->beginChangeset(); |
| 226 | 226 | $phpcsFile->fixer->addNewlineBefore($closingBracePtr - 1); |
| 227 | - $phpcsFile->fixer->addContentBefore($closingBracePtr - 1, $expectedReturnSpaces . 'return $this;'); |
|
| 227 | + $phpcsFile->fixer->addContentBefore($closingBracePtr - 1, $expectedReturnSpaces.'return $this;'); |
|
| 228 | 228 | $phpcsFile->fixer->addNewlineBefore($closingBracePtr - 1); |
| 229 | 229 | $phpcsFile->fixer->endChangeset(); |
| 230 | 230 | } |
@@ -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 | } |
@@ -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 | } |
@@ -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']; |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | array_walk( |
| 91 | 91 | $allTags, |
| 92 | 92 | // TODO: Removed Duplicates |
| 93 | - function (array $tag, int $tagPos) use (&$checkedTags, $tagRules): void { |
|
| 93 | + function(array $tag, int $tagPos) use (&$checkedTags, $tagRules): void { |
|
| 94 | 94 | $tagContent = substr($tag['content'], 1); |
| 95 | 95 | |
| 96 | 96 | if (!in_array($tagContent, $checkedTags)) { |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | $tagPos, |
| 106 | 106 | // We use an error code containing the tag name because we can't configure this rules from |
| 107 | 107 | // the outside and need specific code to exclude the rule for this special tag. |
| 108 | - self::CODE_TAG_OCCURRENCE_MAX_PREFIX . ucfirst($tagContent), |
|
| 108 | + self::CODE_TAG_OCCURRENCE_MAX_PREFIX.ucfirst($tagContent), |
|
| 109 | 109 | [ |
| 110 | 110 | $tagContent, |
| 111 | 111 | $maxCount, |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | |
| 131 | 131 | array_walk( |
| 132 | 132 | $rulesWithReq, |
| 133 | - function (array $tagRule, string $tag) use ($checkedRule): void { |
|
| 133 | + function(array $tagRule, string $tag) use ($checkedRule): void { |
|
| 134 | 134 | $minCount = $tagRule[$checkedRule]; |
| 135 | 135 | $tagCount = count($this->findTokensForTag($tag)); |
| 136 | 136 | |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | $this->getDocCommentPos(), |
| 141 | 141 | // We use an error code containing the tag name because we can't configure this rules from the |
| 142 | 142 | // outside and need specific code to exclude the rule for this special tag. |
| 143 | - self::CODE_TAG_OCCURRENCE_MIN_PREFIX . ucfirst($tag), |
|
| 143 | + self::CODE_TAG_OCCURRENCE_MIN_PREFIX.ucfirst($tag), |
|
| 144 | 144 | [ |
| 145 | 145 | $tag, |
| 146 | 146 | $minCount, |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | { |
| 164 | 164 | $allTags = $this->getAllTags(); |
| 165 | 165 | |
| 166 | - return array_filter($allTags, function (array $tag) use ($tagName): bool { |
|
| 166 | + return array_filter($allTags, function(array $tag) use ($tagName): bool { |
|
| 167 | 167 | return substr($tag['content'], 1) === $tagName; |
| 168 | 168 | }); |
| 169 | 169 | } |
@@ -207,7 +207,7 @@ discard block |
||
| 207 | 207 | { |
| 208 | 208 | $processedTagRules = $this->getProcessedTagRules(); |
| 209 | 209 | |
| 210 | - $processedTagRules = array_filter($processedTagRules, function (array $tagRule) use ($requiredRule): bool { |
|
| 210 | + $processedTagRules = array_filter($processedTagRules, function(array $tagRule) use ($requiredRule): bool { |
|
| 211 | 211 | return array_key_exists($requiredRule, $tagRule); |
| 212 | 212 | }); |
| 213 | 213 | return $processedTagRules; |
@@ -246,8 +246,8 @@ discard block |
||
| 246 | 246 | { |
| 247 | 247 | $processedTagRules = $this->getTagRules(); |
| 248 | 248 | |
| 249 | - array_walk($processedTagRules, function (&$tagRule) { |
|
| 250 | - $tagRule = array_map(function ($valueOrCallback) { |
|
| 249 | + array_walk($processedTagRules, function(&$tagRule) { |
|
| 250 | + $tagRule = array_map(function($valueOrCallback) { |
|
| 251 | 251 | return is_callable($valueOrCallback, true) |
| 252 | 252 | ? Closure::fromCallable($valueOrCallback)->call($this) |
| 253 | 253 | : $valueOrCallback; |
@@ -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 | } |