Completed
Pull Request — master (#62)
by
unknown
02:54
created
src/Standards/BestIt/Sniffs/SuppressingTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -328,7 +328,7 @@
 block discarded – undo
328 328
         );
329 329
 
330 330
         if ($sniffName) {
331
-            $sniffFQCN .= '.' . $sniffName;
331
+            $sniffFQCN .= '.'.$sniffName;
332 332
         }
333 333
 
334 334
         return $sniffFQCN;
Please login to merge, or discard this patch.
src/Standards/BestIt/Sniffs/TypeHints/ReturnTypeDeclarationSniff.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -105,12 +105,12 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Standards/BestIt/Sniffs/DocTags/TagContentFormatTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@
 block discarded – undo
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
 }
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
     /**
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Standards/BestIt/Sniffs/DocTags/ReturnTagSniff.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
      *
60 60
      * @var string
61 61
      */
62
-    private const MESSAGE_CODE_NO_ARRAY_FOUND = 'Your doc block describes an array return. ' .
62
+    private const MESSAGE_CODE_NO_ARRAY_FOUND = 'Your doc block describes an array return. '.
63 63
     'But there was no ": array" found at the end of your method';
64 64
 
65 65
     /**
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
      *
82 82
      * @var string
83 83
      */
84
-    private const MESSAGE_CODE_TAG_NOT_EQUAL_TO_RETURN_TYPE = 'Your return-type is not equal to your return-tag ' .
84
+    private const MESSAGE_CODE_TAG_NOT_EQUAL_TO_RETURN_TYPE = 'Your return-type is not equal to your return-tag '.
85 85
     'in method description';
86 86
 
87 87
     /**
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
      *
90 90
      * @var string
91 91
      */
92
-    private const MESSAGE_TAG_MIXED_TYPE = 'We suggest that you avoid the "mixed" type and declare the ' .
92
+    private const MESSAGE_TAG_MIXED_TYPE = 'We suggest that you avoid the "mixed" type and declare the '.
93 93
     'required types in detail.';
94 94
 
95 95
     /**
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
 
223 223
             if ($nextReturnType['code'] === T_NULLABLE) {
224 224
                 $nextReturnType = $this->file->getTokens()[$nextReturnTypePos + 1];
225
-                $nextReturnType['content'] = '?' . $nextReturnType['content'];
225
+                $nextReturnType['content'] = '?'.$nextReturnType['content'];
226 226
                 $nextReturnType['position'] = $nextReturnTypePos;
227 227
             }
228 228
         }
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 
246 246
         $this->file->fixer->replaceToken(
247 247
             $this->stackPos + 2,
248
-            $this->returnType['content'] . '' . $originDesc
248
+            $this->returnType['content'].''.$originDesc
249 249
         );
250 250
 
251 251
         $this->file->fixer->endChangeset();
Please login to merge, or discard this patch.