@@ -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, |
@@ -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 | /** |
@@ -195,13 +195,13 @@ discard block |
||
195 | 195 | $this->stackPos - 1 |
196 | 196 | ); |
197 | 197 | |
198 | - $tagPosBeforeThis = array_filter($tagPosBeforeThis, function (int $position) { |
|
198 | + $tagPosBeforeThis = array_filter($tagPosBeforeThis, function(int $position) { |
|
199 | 199 | return $this->tokens[$position]['content'] === '@param'; |
200 | 200 | }); |
201 | 201 | |
202 | 202 | $varOfThisTag = array_values($this->varTokens)[count($tagPosBeforeThis)]; |
203 | 203 | |
204 | - return '/(?P<type>[\w|\|\[\]]*) ?(?P<var>' . preg_quote($varOfThisTag['content'], '/') . |
|
204 | + return '/(?P<type>[\w|\|\[\]]*) ?(?P<var>'.preg_quote($varOfThisTag['content'], '/'). |
|
205 | 205 | ') ?(?P<desc>.*)/m'; |
206 | 206 | } |
207 | 207 | |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | ->setToken($this->token); |
222 | 222 | } |
223 | 223 | |
224 | - $this->varTokens = array_filter($this->tokens, function (array $token) use ($varPositions): bool { |
|
224 | + $this->varTokens = array_filter($this->tokens, function(array $token) use ($varPositions): bool { |
|
225 | 225 | return in_array($token['pointer'], $varPositions, true); |
226 | 226 | }); |
227 | 227 |
@@ -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 | /** |