Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/mail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Wurst <ChristophWurst@users.noreply.github.com>2020-10-08 14:58:16 +0300
committerGitHub <noreply@github.com>2020-10-08 14:58:16 +0300
commitd03978a5291cb57112eac075965fa69aec629a96 (patch)
tree9c9159712333d75cf838a14aaf98e3dfc50e361e /lib/Service
parente9c00d3d0da577229298dbd0621e4824431de069 (diff)
parent1f825adf93c0bbc6a81a9172f15745f934cc84d5 (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.php2
-rw-r--r--lib/Service/ContactsIntegration.php3
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']);