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

        if (!isset($response['lovedtracks']['track'])) {
            return [];
        }

        return ApiHelper::mapList(
            static function ($data) {
                return Song::fromApi($data);
            },
            $response['lovedtracks']['track']
        );
    }
public function getLovedTracks(string $username, int $limit = 50, int $page = 1): array
    {
        $response = $this->client->unsignedCall('user.getLovedTracks', [
            'user'  => $username,
            'limit' => $limit,
            'page'  => $page,
        ]);

        if (!isset($response['lovedtracks']['track'])) {
            return [];
        }

        return ApiHelper::mapList(
            static function ($data) {
                return Song::fromApi($data);
            },
            $response['lovedtracks']['track']
        );
    }
{@inheritdoc}