Revert "[TASK] Avoid slow array functions in loops"
[Packages/TYPO3.CMS.git] / typo3 / sysext / extbase / Classes / Reflection / PropertyInfo / Extractor / PhpDocPropertyTypeExtractor.php
index 0305647..711a90a 100644 (file)
@@ -90,14 +90,13 @@ class PhpDocPropertyTypeExtractor implements PropertyTypeExtractorInterface
             return null;
         }
 
-        $types = [[]];
+        $types = [];
         /** @var Var_ $tag */
         foreach ($docBlock->getTagsByName('var') as $tag) {
             if ($tag && null !== $tag->getType()) {
-                $types[] = $this->phpDocTypeHelper->getTypes($tag->getType());
+                $types = array_merge($types, $this->phpDocTypeHelper->getTypes($tag->getType()));
             }
         }
-        $types = array_merge(...$types);
 
         if (!isset($types[0])) {
             return null;