Maintenance: Updated PHPStan to Level 4 (#6085)

This commit is contained in:
Dan Brown
2026-04-08 21:03:20 +01:00
committed by GitHub
parent c33853ed84
commit 5e78dc6ed5
34 changed files with 105 additions and 102 deletions

View File

@@ -266,7 +266,7 @@ class Saml2Service
/**
* Extract the details of a user from a SAML response.
*
* @return array{external_id: string, name: string, email: string, saml_id: string}
* @return array{external_id: string, name: string, email: string|null, saml_id: string}
*/
protected function getUserDetails(string $samlID, $samlAttributes): array
{
@@ -357,7 +357,7 @@ class Saml2Service
]);
}
if ($userDetails['email'] === null) {
if (empty($userDetails['email'])) {
throw new SamlException(trans('errors.saml_no_email_address'));
}