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

github.com/nextcloud/contacts.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Wurst <ChristophWurst@users.noreply.github.com>2022-09-28 13:03:30 +0300
committerGitHub <noreply@github.com>2022-09-28 13:03:30 +0300
commit7d610c259a98bd8c0e16b5689aee90f92753c495 (patch)
tree9f3283549e6ee262cd771d3b837d73463b6fcb7f
parent48be4a135b8f2c787d83b2d8c4bfc65345349aa0 (diff)
parent5eab5058ca36dbc41331421bd764f7877aa7a182 (diff)
Merge pull request #2647 from nextcloud/fix/missing-strict-social-service
Fix missing strict types for the social service
-rw-r--r--lib/Service/SocialApiService.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/Service/SocialApiService.php b/lib/Service/SocialApiService.php
index 378b2fbd..3959eaf6 100644
--- a/lib/Service/SocialApiService.php
+++ b/lib/Service/SocialApiService.php
@@ -1,4 +1,7 @@
<?php
+
+declare(strict_types=1);
+
/**
* @copyright Copyright (c) 2020 Matthias Heinisch <nextcloud@matthiasheinisch.de>
*
@@ -300,11 +303,11 @@ class SocialApiService {
*
* @param {array} report where the results are added
* @param {String} entry the element to add
- * @param {string} status the (http) status code
+ * @param {int} status the (http) status code
*
* @returns {array} the report including the new entry
*/
- protected function registerUpdateResult(array $report, string $entry, string $status) : array {
+ protected function registerUpdateResult(array $report, string $entry, int $status) : array {
// initialize report on first call
if (empty($report)) {
$report = [
@@ -411,9 +414,9 @@ class SocialApiService {
try {
$r = $this->updateContact($addressBook->getURI(), $contact['UID'], $network);
- $response = $this->registerUpdateResult($response, $contact['FN'], $r->getStatus());
+ $response = $this->registerUpdateResult($response, $contact['FN'], (int) $r->getStatus());
} catch (\Exception $e) {
- $response = $this->registerUpdateResult($response, $contact['FN'], '-1');
+ $response = $this->registerUpdateResult($response, $contact['FN'], -1);
}
// stop after 15sec (to be continued with next chunk)