Fix missing strict types for the social service

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
Christoph Wurst 2022-02-18 17:47:39 +01:00
parent 48be4a135b
commit 5eab5058ca
No known key found for this signature in database
GPG Key ID: CC42AC2A7F0E56D8
1 changed files with 7 additions and 4 deletions

View File

@ -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)