Skip to content

Commit

Permalink
Merge pull request #54 from achmadhadikurnia/chore/code-improvement
Browse files Browse the repository at this point in the history
Chore/code improvement
  • Loading branch information
achmadhadikurnia authored Jul 7, 2024
2 parents acfbbf0 + 5a93452 commit 9169a5e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/Credentials/Token.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
21 changes: 3 additions & 18 deletions src/Helpers/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,49 +4,37 @@

class Config
{
/**
* Get mode.
*/
public static function getMode(): string
{
return config('siasn-api.mode');
}

/**
* Get is production.
* @noinspection PhpUnused
*/
public static function isProduction(): bool
{
return self::getMode() === 'production';
}

/**
* 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) [
Expand All @@ -57,9 +45,6 @@ public static function getApimCredential(): object
];
}

/**
* Get SSO configuration.
*/
public static function getSsoCredential(): object
{
return (object) [
Expand All @@ -72,7 +57,7 @@ public static function getSsoCredential(): object
}

/**
* Get get const.
* @noinspection PhpUnused
*/
public static function getConst(): object
{
Expand Down

0 comments on commit 9169a5e

Please sign in to comment.