Skip to content

Stan errors fixes#4

Draft
markren77 wants to merge 3 commits intomainfrom
bug-fixes-for-playlists
Draft

Stan errors fixes#4
markren77 wants to merge 3 commits intomainfrom
bug-fixes-for-playlists

Conversation

@markren77
Copy link

No description provided.

@markren77 markren77 self-assigned this May 9, 2025
@markren77 markren77 requested a review from edgrosvenor May 9, 2025 22:26
} elseif ($response instanceof ResponseInterface) {
return new BaseSpotifyResponse($response->getData());
} else {
return new BaseSpotifyResponse([]);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should throw an exception here rather than an empty response

);
if ($response instanceof BaseSpotifyResponse) {
return $response;
} elseif ($response instanceof ResponseInterface) {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since BaseSpotifyResponse implements ResponseInterface, we can change these if statements to just if $response instanceof ResponseInterface

return new BaseSpotifyResponse($response->getData());
} else {
return new BaseSpotifyResponse([]);
}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same deal as AddTrackTo....

return new BaseSpotifyResponse($response->getData());
} else {
return new BaseSpotifyResponse([]);
}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as the comment for the other if statements

return new BaseSpotifyResponse($response->getData());
} else {
return new BaseSpotifyResponse([]);
}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

return new BaseSpotifyResponse($response->getData());
} else {
return new BaseSpotifyResponse([]);
}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

return new BaseSpotifyResponse($response->getData());
} else {
return new BaseSpotifyResponse([]);
}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same


public function getData(): array
{
return $this->tracks;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

two methods returning same thing?

@markren77 markren77 marked this pull request as draft May 16, 2025 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant