diff --git a/src/PhpFileParser.php b/src/PhpFileParser.php index 80f6559..27fc690 100644 --- a/src/PhpFileParser.php +++ b/src/PhpFileParser.php @@ -125,13 +125,12 @@ private static function getExtraTypes(): string if (null === $extraTypes) { $extraTypes = ''; + $extraTypesArray = []; if (PHP_VERSION_ID >= 80100 || (defined('HHVM_VERSION') && version_compare(HHVM_VERSION, '3.3', '>='))) { $extraTypes .= '|enum'; + $extraTypesArray = ['enum']; } - $extraTypesArray = array_filter(explode('|', $extraTypes), function (string $type): bool { - return $type !== ''; - }); PhpFileCleaner::setTypeConfig(array_merge(['class', 'interface', 'trait'], $extraTypesArray)); }