diff --git a/src/Psalm/Issue/InternalClass.php b/src/Psalm/Issue/InternalClass.php index 827c9013419..087eece0201 100644 --- a/src/Psalm/Issue/InternalClass.php +++ b/src/Psalm/Issue/InternalClass.php @@ -3,6 +3,7 @@ namespace Psalm\Issue; use function array_pop; +use function array_unique; use function count; use function implode; use function reset; @@ -15,6 +16,7 @@ final class InternalClass extends ClassIssue /** @param non-empty-list $words */ public static function listToPhrase(array $words): string { + $words = array_unique($words); if (count($words) === 1) { return reset($words); }