Passed
Push — master ( e59da1...e2e2f1 )
by Björn
01:18 queued 14s
created
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.