Completed
Push — master ( 985ca9...e0892e )
by David
18s
created
src/Rules/TypeHints/AbstractMissingTypeHintRule.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -287,15 +287,15 @@  discard block
 block discarded – undo
287 287
         }
288 288
 
289 289
         if ($type instanceof ObjectType) {
290
-            return ($isNullable?'?':'').'\\'.$type->describe(VerbosityLevel::typeOnly());
290
+            return ($isNullable ? '?' : '').'\\'.$type->describe(VerbosityLevel::typeOnly());
291 291
         }
292 292
 
293 293
         if ($type instanceof ArrayType) {
294
-            return ($isNullable?'?':'').'array';
294
+            return ($isNullable ? '?' : '').'array';
295 295
         }
296 296
 
297 297
         if ($this->isNativeType($type)) {
298
-            return ($isNullable?'?':'').$type->describe(VerbosityLevel::typeOnly());
298
+            return ($isNullable ? '?' : '').$type->describe(VerbosityLevel::typeOnly());
299 299
         }
300 300
 
301 301
         // TODO: more definitions to add here
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
     private function typesWithoutNullable(Type $docBlockTypeHints): Type
346 346
     {
347 347
         if ($docBlockTypeHints instanceof UnionType) {
348
-            $filteredTypes = array_values(array_filter($docBlockTypeHints->getTypes(), function (Type $item) {
348
+            $filteredTypes = array_values(array_filter($docBlockTypeHints->getTypes(), function(Type $item) {
349 349
                 return !$item instanceof NullType;
350 350
             }));
351 351
             if (\count($filteredTypes) === 1) {
Please login to merge, or discard this patch.