Skip to content

Commit

Permalink
Bump to 7.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
evansims committed Jul 24, 2023
1 parent a1e12a4 commit fbb6ee5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
19 changes: 10 additions & 9 deletions src/Controllers/CallbackControllerAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,17 +155,18 @@ public function __invoke(

private function clearSession(
GuardAbstract $guard,
$clearTransientStorage = true,
$clearPersistentStorage = true,
$clearSdkStorage = false
): void
{
if ($clearTransientStorage) {
$guard->service()->getConfiguration()->getTransientStorage()->purge();
bool $clearTransientStorage = true,
bool $clearPersistentStorage = true,
bool $clearSdkStorage = false,
): void {
$service = $guard->service() ?? null;

if ($clearTransientStorage && null !== $service) {
$service->getConfiguration()->getTransientStorage()?->purge();
}

if ($clearPersistentStorage) {
$guard->service()->getConfiguration()->getSessionStorage()->purge();
if ($clearPersistentStorage && null !== $service) {
$service->getConfiguration()->getSessionStorage()?->purge();
}

if ($clearSdkStorage) {
Expand Down
3 changes: 2 additions & 1 deletion src/Guards/GuardAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,8 @@ final public function sdk(
return $this->sdk->getSdk();
}

final public function service(): InstanceEntityContract {
final public function service(): ?InstanceEntityContract
{
return $this->sdk;
}

Expand Down

0 comments on commit fbb6ee5

Please sign in to comment.