src/Service/UserService.php
public function getTopAlbums(string $username, Period $period, int $limit = 50, int $page = 1): array
    {
        $response = $this->client->unsignedCall('user.getTopAlbums', [
            'user'   => $username,
            'period' => $period->getValue(),
            'limit'  => $limit,
            'page'   => $page,
        ]);

        if (!isset($response['topalbums']['album'])) {
            return [];
        }

        return ApiHelper::mapList(
            static function ($data) {
                return Album::fromApi($data);
            },
            $response['topalbums']['album']
        );
    }
public function getTopAlbums(string $username, Period $period, int $limit = 50, int $page = 1): array
    {
        $response = $this->client->unsignedCall('user.getTopAlbums', [
            'user'   => $username,
            'period' => $period->getValue(),
            'limit'  => $limit,
            'page'   => $page,
        ]);

        if (!isset($response['topalbums']['album'])) {
            return [];
        }

        return ApiHelper::mapList(
            static function ($data) {
                return Album::fromApi($data);
            },
            $response['topalbums']['album']
        );
    }
{@inheritdoc}