]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Api/Twitter/ContactEndpoint.php
spelling: days
[friendica.git] / src / Module / Api / Twitter / ContactEndpoint.php
index 541f7fd86d05e31040361a188d96bcb5cc0d05a2..a338d3ce7041df03ffe9bccae3528047c198ae99 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -23,9 +23,7 @@ namespace Friendica\Module\Api\Twitter;
 
 use Friendica\App;
 use Friendica\Core\L10n;
-use Friendica\Database\DBA;
 use Friendica\DI;
-use Friendica\Model\Profile;
 use Friendica\Model\User;
 use Friendica\Module\Api\ApiResponse;
 use Friendica\Module\BaseApi;
@@ -64,7 +62,7 @@ abstract class ContactEndpoint extends BaseApi
                        if (!$screen_name) {
                                $contact = Contact::getById($contact_id, ['nick', 'url']);
                                // We don't have the followers of remote accounts so we check for locality
-                               if (empty($contact) || !Strings::startsWith($contact['url'], DI::baseUrl()->get())) {
+                               if (empty($contact) || !Strings::startsWith($contact['url'], DI::baseUrl())) {
                                        throw new HTTPException\NotFoundException(DI::l10n()->t('Contact not found'));
                                }
 
@@ -97,7 +95,7 @@ abstract class ContactEndpoint extends BaseApi
         * @throws HTTPException\NotFoundException
         * @throws \ImagickException
         */
-       protected static function list(array $ids, int $total_count, int $uid, int $cursor = -1, int $count = self::DEFAULT_COUNT, bool $skip_status = false, bool $include_user_entities = true)
+       protected static function list(array $ids, int $total_count, int $uid, int $cursor = -1, int $count = self::DEFAULT_COUNT, bool $skip_status = false, bool $include_user_entities = true): array
        {
                $return = self::ids($ids, $total_count, $cursor, $count, false);
 
@@ -130,7 +128,7 @@ abstract class ContactEndpoint extends BaseApi
         * @return array
         * @throws HTTPException\NotFoundException
         */
-       protected static function ids(array $ids, int $total_count, int $cursor = -1, int $count = self::DEFAULT_COUNT, bool $stringify_ids = false)
+       protected static function ids(array $ids, int $total_count, int $cursor = -1, int $count = self::DEFAULT_COUNT, bool $stringify_ids = false): array
        {
                $next_cursor = 0;
                $previous_cursor = 0;