@@ -173,13 +173,13 @@ discard block |
||
| 173 | 173 | $this->stackPos - 1 |
| 174 | 174 | ); |
| 175 | 175 | |
| 176 | - $tagPosBeforeThis = array_filter($tagPosBeforeThis, function (int $position) { |
|
| 176 | + $tagPosBeforeThis = array_filter($tagPosBeforeThis, function(int $position) { |
|
| 177 | 177 | return $this->tokens[$position]['content'] === '@param'; |
| 178 | 178 | }); |
| 179 | 179 | |
| 180 | 180 | $varOfThisTag = array_values($this->varTokens)[count($tagPosBeforeThis)]; |
| 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 | |
@@ -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 | } |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | $tokenIdent = $this->getTokenName(); |
| 93 | 93 | |
| 94 | 94 | $exception = (new CodeError( |
| 95 | - self::CODE_MISSING_DOC_BLOCK_PREFIX . ucfirst($tokenIdent), |
|
| 95 | + self::CODE_MISSING_DOC_BLOCK_PREFIX.ucfirst($tokenIdent), |
|
| 96 | 96 | self::MESSAGE_MISSING_DOC_BLOCK, |
| 97 | 97 | $this->stackPos |
| 98 | 98 | ))->setPayload([lcfirst($tokenIdent)]); |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | $tokenIdent = $this->getTokenName(); |
| 119 | 119 | |
| 120 | 120 | $exception = (new CodeError( |
| 121 | - self::CODE_NO_MULTI_LINE_DOC_BLOCK_PREFIX . ucfirst($tokenIdent), |
|
| 121 | + self::CODE_NO_MULTI_LINE_DOC_BLOCK_PREFIX.ucfirst($tokenIdent), |
|
| 122 | 122 | self::MESSAGE_NO_MULTI_LINE_DOC_BLOCK_PREFIX, |
| 123 | 123 | $docCommentPos |
| 124 | 124 | ))->setPayload([lcfirst($tokenIdent)]); |
@@ -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(); |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | * |
| 37 | 37 | * @var string |
| 38 | 38 | */ |
| 39 | - private const WARNING_MULTIPLE_RETURNS_FOUND = 'Multiple returns detected. Did you refactor your method? Please ' . |
|
| 39 | + private const WARNING_MULTIPLE_RETURNS_FOUND = 'Multiple returns detected. Did you refactor your method? Please '. |
|
| 40 | 40 | 'do not use an early return if your method/function still is cluttered.'; |
| 41 | 41 | |
| 42 | 42 | /** |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | $this->token['scope_closer'] |
| 66 | 66 | ); |
| 67 | 67 | |
| 68 | - return array_filter($returnPositions, function (int $returnPos): bool { |
|
| 68 | + return array_filter($returnPositions, function(int $returnPos): bool { |
|
| 69 | 69 | $possibleClosure = $this->file->findPrevious([T_CLOSURE, T_FUNCTION], $returnPos - 1, $this->stackPos); |
| 70 | 70 | |
| 71 | 71 | return $possibleClosure === $this->stackPos; |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | if (count($returnPositions) > 1) { |
| 85 | 85 | array_shift($returnPositions); |
| 86 | 86 | |
| 87 | - array_walk($returnPositions, function (int $returnPos): void { |
|
| 87 | + array_walk($returnPositions, function(int $returnPos): void { |
|
| 88 | 88 | $this->file->addWarning( |
| 89 | 89 | self::WARNING_MULTIPLE_RETURNS_FOUND, |
| 90 | 90 | $returnPos, |