From 480708637b8309ea7cd7675d827e05a7f50a6dab Mon Sep 17 00:00:00 2001 From: kkmuffme <11071985+kkmuffme@users.noreply.github.com> Date: Sun, 1 Oct 2023 21:32:34 +0200 Subject: [PATCH] Fix https://psalm.dev/r/77be914054 --- src/Psalm/Issue/InternalClass.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Psalm/Issue/InternalClass.php b/src/Psalm/Issue/InternalClass.php index 827c9013419..93af91b4648 100644 --- a/src/Psalm/Issue/InternalClass.php +++ b/src/Psalm/Issue/InternalClass.php @@ -2,6 +2,7 @@ namespace Psalm\Issue; +use function array_unique; use function array_pop; use function count; use function implode; @@ -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); }