1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 20:34:47 +01:00

Merge pull request #10241 from kkmuffme/remove-duplicate-namespace-in-internal-method-error

Remove duplicate namespace in InternalMethod error message
This commit is contained in:
orklah 2023-10-02 21:35:54 +02:00 committed by GitHub
commit 3a8f2d2a07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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<non-empty-string> $words */
public static function listToPhrase(array $words): string
{
$words = array_unique($words);
if (count($words) === 1) {
return reset($words);
}