diff options
author | Christoph Wurst <ChristophWurst@users.noreply.github.com> | 2020-10-08 14:58:16 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-08 14:58:16 +0300 |
commit | d03978a5291cb57112eac075965fa69aec629a96 (patch) | |
tree | 9c9159712333d75cf838a14aaf98e3dfc50e361e /lib/Service | |
parent | e9c00d3d0da577229298dbd0621e4824431de069 (diff) | |
parent | 1f825adf93c0bbc6a81a9172f15745f934cc84d5 (diff) |
Merge pull request #3751 from nextcloud/techdept/psalm-false-falseable-return
Fix invalid falsable returns detected by Psalm
Diffstat (limited to 'lib/Service')
-rw-r--r-- | lib/Service/Avatar/AddressbookSource.php | 2 | ||||
-rw-r--r-- | lib/Service/ContactsIntegration.php | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/Service/Avatar/AddressbookSource.php b/lib/Service/Avatar/AddressbookSource.php index 12b76e8f7..f37034c44 100644 --- a/lib/Service/Avatar/AddressbookSource.php +++ b/lib/Service/Avatar/AddressbookSource.php @@ -56,7 +56,7 @@ class AddressbookSource implements IAvatarSource { public function fetch(string $email, AvatarFactory $factory) { $url = $this->contactsIntegration->getPhoto($email); - if (is_null($url)) { + if ($url === false || $url === null) { return null; } diff --git a/lib/Service/ContactsIntegration.php b/lib/Service/ContactsIntegration.php index cded586ed..2f5a1f139 100644 --- a/lib/Service/ContactsIntegration.php +++ b/lib/Service/ContactsIntegration.php @@ -92,7 +92,8 @@ class ContactsIntegration { /** * @param string $email - * @return null|string + * + * @return false|null|string */ public function getPhoto(string $email) { $result = $this->contactsManager->search($email, ['EMAIL']); |