Fix code style

This commit is contained in:
Art4 2025-01-13 13:31:54 +00:00
parent d4697a17a3
commit 0e59dba914
102 changed files with 3038 additions and 2764 deletions

View file

@ -117,15 +117,15 @@ class Search
$results = json_decode($resultJson, true);
$resultList = new ResultList(
($results['page'] ?? 0) ?: 1,
$results['count'] ?? 0,
($results['page'] ?? 0) ?: 1,
$results['count'] ?? 0,
($results['itemsperpage'] ?? 0) ?: 30
);
$profiles = $results['profiles'] ?? [];
foreach ($profiles as $profile) {
$profile_url = $profile['profile_url'] ?? '';
$profile_url = $profile['profile_url'] ?? '';
$contactDetails = Contact::getByURLForUser($profile_url, DI::userSession()->getLocalUserId());
$result = new ContactResult(
@ -137,7 +137,7 @@ class Search
Protocol::DFRN,
$contactDetails['cid'] ?? 0,
$contactDetails['zid'] ?? 0,
$profile['tags'] ?? ''
$profile['tags'] ?? ''
);
$resultList->addResult($result);
@ -231,7 +231,7 @@ class Search
// Converting Directory Search results into contact-looking records
$return = array_map(function ($result) {
static $contactType = [
'People' => Contact::TYPE_PERSON,
'People' => Contact::TYPE_PERSON,
// Kept for backward compatibility
'Forum' => Contact::TYPE_COMMUNITY,
'Group' => Contact::TYPE_COMMUNITY,