src/Result.php
public function getDuplicates(): array
    {
        $dupes = [];
        foreach ($this->visitor->getCounts() as $type => $names) {
            foreach ($names as $name => $count) {
                if ($count > 1) {
                    $dupes[] = [
                        'type' => $type,
                        'name' => $type === 'globals' ? '$' . $name : ltrim($name, '\\'),
                        'count' => $count,
                    ];
                }
            }
        }

        usort($dupes, function (array $a, array $b): int {
            return $a['type'] <=> $b['type'] ?: $a['name'] <=> $b['name'];
        });

        return $dupes;
    }
public function getDuplicates(): array
    {
        $dupes = [];
        foreach ($this->visitor->getCounts() as $type => $names) {
            foreach ($names as $name => $count) {
                if ($count > 1) {
                    $dupes[] = [
                        'type' => $type,
                        'name' => $type === 'globals' ? '$' . $name : ltrim($name, '\\'),
                        'count' => $count,
                    ];
                }
            }
        }

        usort($dupes, function (array $a, array $b): int {
            return $a['type'] <=> $b['type'] ?: $a['name'] <=> $b['name'];
        });

        return $dupes;
    }
public function getDuplicates ( ) : array { $ dupes = [ ] ; foreach ( $ this -> visitor -> getCounts ( ) as $ type => $ names ) { foreach ( $ names as $ name => $ count ) { if ( $ count > 1 ) { $ dupes [ ] = [ 'type' => $ type , 'name' => $ type === 'globals' ? '$' . $ name : ltrim ( $ name , '\\' ) , 'count' => $ count , ] ; } } } usort ( $ dupes , function ( array $ a , array $ b ) : int { return $ a [ 'type' ] <=> $ b [ 'type' ] ? : $ a [ 'name' ] <=> $ b [ 'name' ] ; } ) ; return $ dupes ; }
Returns a list which includes any symbols for which more than one
declaration was found during stub generation.

@return (string|int)[][]
@psalm-return array<array{ type: string, name: string, count: int }>
Returns a list which includes any symbols for which more than one declaration was found during stub generation .