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:
commit
3a8f2d2a07
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user