Skip to content

Commit

Permalink
fix phpstan issues
Browse files Browse the repository at this point in the history
  • Loading branch information
solverat committed Dec 18, 2024
1 parent 2052cc9 commit ce3bd5a
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/Manager/SsoIdentityManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,15 @@ public function createSsoIdentity(UserInterface $user, string $provider, string
$ssoIdentity = new $ssoIdentityClass();
}

if (!$ssoIdentity instanceof DataObject\Concrete) {
throw new \RuntimeException('Sso Identity needs to be an instance of Concrete');
}

$ssoIdentity->setProvider($provider);
$ssoIdentity->setIdentifier($identifier);
$ssoIdentity->setProfileData($profileData);
$ssoIdentity->setPublished(true);
$ssoIdentity->setKey($key);
$ssoIdentity->setParent($user);

if ($ssoIdentity instanceof DataObject\Concrete) {
$ssoIdentity->setPublished(true);
$ssoIdentity->setKey($key);
$ssoIdentity->setParent($user);
}

return $ssoIdentity;
}
Expand Down

0 comments on commit ce3bd5a

Please # to comment.