src/Service/UserService.php
public function getArtistTracks(string $username, string $artist, ?RangeFilter $filter = null, int $page = 1): array
    {
        $query = null !== $filter ? $filter->getQuery('startTimestamp', 'endTimestamp') : [];
        $query = array_merge($query, [
            'user'           => $username,
            'artist'         => $artist,
            'page'           => $page,
        ]);

        $response = $this->client->unsignedCall('user.getArtistTracks', $query);

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

        return ApiHelper::mapList(
            static function ($data) {
                return Song::fromApi($data);
            },
            $response['artisttracks']['track']
        );
    }
public function getArtistTracks(string $username, string $artist, ?RangeFilter $filter = null, int $page = 1): array
    {
        $query = null !== $filter ? $filter->getQuery('startTimestamp', 'endTimestamp') : [];
        $query = array_merge($query, [
            'user'           => $username,
            'artist'         => $artist,
            'page'           => $page,
        ]);

        $response = $this->client->unsignedCall('user.getArtistTracks', $query);

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

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