diff --git a/CakePHP/Sniffs/Commenting/TypeHintSniff.php b/CakePHP/Sniffs/Commenting/TypeHintSniff.php index 2bcdc4f..9a7d5b4 100644 --- a/CakePHP/Sniffs/Commenting/TypeHintSniff.php +++ b/CakePHP/Sniffs/Commenting/TypeHintSniff.php @@ -165,6 +165,7 @@ protected function getSortedTypeHint(array $types): string '\\Closure', '\\Traversable', '\\ArrayAccess', + '\\ArrayObject', '\\Stringable', '\\Generator', 'mixed', @@ -172,6 +173,7 @@ protected function getSortedTypeHint(array $types): string 'resource', 'object', 'iterable', + 'list', 'array', 'callable-string', 'class-string', @@ -211,8 +213,6 @@ protected function getSortedTypeHint(array $types): string } elseif ($type instanceof GenericTypeNode) { if (in_array($type->type->name, $shouldSort)) { $sortName = $type->type->name; - } else { - $sortName = 'array'; } }