From d6e397247ace00ab0987248ebbf06fd6a516ffbe Mon Sep 17 00:00:00 2001 From: netkas Date: Wed, 29 Jan 2025 15:42:28 -0500 Subject: [PATCH] Formatting update --- src/Socialbox/Enums/StandardError.php | 140 +++++++++++++------------- 1 file changed, 70 insertions(+), 70 deletions(-) diff --git a/src/Socialbox/Enums/StandardError.php b/src/Socialbox/Enums/StandardError.php index 804f396..8824d54 100644 --- a/src/Socialbox/Enums/StandardError.php +++ b/src/Socialbox/Enums/StandardError.php @@ -1,80 +1,80 @@ 'Unknown Error', + return match ($this) + { + default => 'Unknown Error', - self::RPC_METHOD_NOT_FOUND => 'The request method was not found', - self::RPC_INVALID_ARGUMENTS => 'The request method contains one or more invalid arguments', + self::RPC_METHOD_NOT_FOUND => 'The request method was not found', + self::RPC_INVALID_ARGUMENTS => 'The request method contains one or more invalid arguments', - self::INTERNAL_SERVER_ERROR => 'Internal server error', - self::SERVER_UNAVAILABLE => 'Server temporarily unavailable', + self::INTERNAL_SERVER_ERROR => 'Internal server error', + self::SERVER_UNAVAILABLE => 'Server temporarily unavailable', - self::INVALID_PUBLIC_KEY => 'The given public key is not valid', - self::UNSUPPORTED_AUTHENTICATION_TYPE => 'The requested authentication type is not supported by the server', - self::ALREADY_AUTHENTICATED => 'The action cannot be preformed while authenticated', - self::AUTHENTICATION_REQUIRED => 'Authentication is required to preform this action', - self::SESSION_NOT_FOUND => 'The requested session UUID was not found', - self::REGISTRATION_DISABLED => 'Registration is disabled on the server', - self::CAPTCHA_NOT_AVAILABLE => 'Captcha is not available', - self::INCORRECT_CAPTCHA_ANSWER => 'The Captcha answer is incorrect', - self::CAPTCHA_EXPIRED => 'The captcha has expired and a new captcha needs to be requested', + self::INVALID_PUBLIC_KEY => 'The given public key is not valid', + self::UNSUPPORTED_AUTHENTICATION_TYPE => 'The requested authentication type is not supported by the server', + self::ALREADY_AUTHENTICATED => 'The action cannot be preformed while authenticated', + self::AUTHENTICATION_REQUIRED => 'Authentication is required to preform this action', + self::SESSION_NOT_FOUND => 'The requested session UUID was not found', + self::REGISTRATION_DISABLED => 'Registration is disabled on the server', + self::CAPTCHA_NOT_AVAILABLE => 'Captcha is not available', + self::INCORRECT_CAPTCHA_ANSWER => 'The Captcha answer is incorrect', + self::CAPTCHA_EXPIRED => 'The captcha has expired and a new captcha needs to be requested', - self::PEER_NOT_FOUND => 'The requested peer was not found', - self::INVALID_USERNAME => 'The given username is invalid, it must be Alphanumeric with a minimum of 3 character but no greater than 255 characters', - self::USERNAME_ALREADY_EXISTS => 'The given username already exists on the network', - self::NOT_REGISTERED => 'The given username is not registered on the server', - self::METHOD_NOT_ALLOWED => 'The requested method is not allowed', - }; + self::PEER_NOT_FOUND => 'The requested peer was not found', + self::INVALID_USERNAME => 'The given username is invalid, it must be Alphanumeric with a minimum of 3 character but no greater than 255 characters', + self::USERNAME_ALREADY_EXISTS => 'The given username already exists on the network', + self::NOT_REGISTERED => 'The given username is not registered on the server', + self::METHOD_NOT_ALLOWED => 'The requested method is not allowed', + }; - } -} \ No newline at end of file + } + } \ No newline at end of file