From f9c674700a340776b61a179c711457c32673a98e Mon Sep 17 00:00:00 2001 From: Achmad Hadi Kurnia Date: Sun, 7 Jul 2024 08:55:21 +0700 Subject: [PATCH 1/2] refactor(improvement): add @noinspection annotation --- src/Helpers/Config.php | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/src/Helpers/Config.php b/src/Helpers/Config.php index bf3640d..cd1b9cb 100644 --- a/src/Helpers/Config.php +++ b/src/Helpers/Config.php @@ -4,16 +4,13 @@ class Config { - /** - * Get mode. - */ public static function getMode(): string { return config('siasn-api.mode'); } /** - * Get is production. + * @noinspection PhpUnused */ public static function isProduction(): bool { @@ -21,32 +18,23 @@ public static function isProduction(): bool } /** - * Get is training. + * @noinspection PhpUnused */ public static function isTraining(): bool { return self::getMode() === 'training'; } - /** - * Get debug. - */ public static function getDebug(): bool { return config('siasn-api.debug'); } - /** - * Get http verify. - */ public static function getEnableSslVerification(): bool { return config('siasn-api.enable_ssl_verification'); } - /** - * Get Apim configuration. - */ public static function getApimCredential(): object { return (object) [ @@ -57,9 +45,6 @@ public static function getApimCredential(): object ]; } - /** - * Get SSO configuration. - */ public static function getSsoCredential(): object { return (object) [ @@ -72,7 +57,7 @@ public static function getSsoCredential(): object } /** - * Get get const. + * @noinspection PhpUnused */ public static function getConst(): object { From 5a934526fc57c0738bf4437cbc72d63b125478c5 Mon Sep 17 00:00:00 2001 From: Achmad Hadi Kurnia Date: Sun, 7 Jul 2024 21:18:00 +0700 Subject: [PATCH 2/2] refactor(improvement): add return type --- src/Credentials/Token.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Credentials/Token.php b/src/Credentials/Token.php index 7d2118d..cf7e6d3 100644 --- a/src/Credentials/Token.php +++ b/src/Credentials/Token.php @@ -34,7 +34,7 @@ public static function getApimToken() }); } - public static function forget() + public static function forget(): void { cache()->forget('apim-token'); cache()->forget('sso-token');