Skip to content

Commit

Permalink
Update SpotifyWebAPIAuthException.php
Browse files Browse the repository at this point in the history
  • Loading branch information
vdesabou authored Oct 11, 2024
1 parent 1d5c903 commit 342bad2
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
// Extends from SpotifyWebApiException for backwards compatibility
class SpotifyWebAPIAuthException extends SpotifyWebAPIException
{
const INVALID_CLIENT = 'Invalid client';
const INVALID_CLIENT_SECRET = 'Invalid client secret';
const INVALID_REFRESH_TOKEN = 'Invalid refresh token';
public const INVALID_CLIENT = 'Invalid client';
public const INVALID_CLIENT_SECRET = 'Invalid client secret';
public const INVALID_REFRESH_TOKEN = 'Invalid refresh token';

/**
* Returns whether the exception was thrown because of invalid credentials.
*
* @return bool
*/
public function hasInvalidCredentials()
public function hasInvalidCredentials(): bool
{
return in_array($this->getMessage(), [
self::INVALID_CLIENT,
Expand All @@ -29,7 +29,7 @@ public function hasInvalidCredentials()
*
* @return bool
*/
public function hasInvalidRefreshToken()
public function hasInvalidRefreshToken(): bool
{
return $this->getMessage() === self::INVALID_REFRESH_TOKEN;
}
Expand Down

0 comments on commit 342bad2

Please sign in to comment.