Passed
Pull Request — master (#49)
by Björn
02:08
created
src/Standards/BestIt/Sniffs/DocTags/AuthorTagSniff.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Standards/BestIt/Sniffs/Commenting/RequiredDocBlockSniff.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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)]);
Please login to merge, or discard this patch.
src/Standards/BestIt/Sniffs/Commenting/AbstractDocSniff.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@
 block discarded – undo
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();
Please login to merge, or discard this patch.
src/Standards/BestIt/Sniffs/Functions/MultipleReturnSniff.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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,
Please login to merge, or discard this patch.
src/Standards/BestIt/Sniffs/DocTags/ParamTagSniff.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Standards/BestIt/Sniffs/DocTags/ReturnTagSniff.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.