summaryrefslogtreecommitdiffstats
path: root/lib/Service/SocialApiService.php
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2022-02-18 17:47:39 +0100
committerChristoph Wurst <christoph@winzerhof-wurst.at>2022-09-28 11:54:02 +0200
commit5eab5058ca36dbc41331421bd764f7877aa7a182 (patch)
tree9f3283549e6ee262cd771d3b837d73463b6fcb7f /lib/Service/SocialApiService.php
parent48be4a135b8f2c787d83b2d8c4bfc65345349aa0 (diff)
Fix missing strict types for the social service
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/Service/SocialApiService.php')
-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)