From 05e41274a09b44a789af8a0082dedf857b1dc158 Mon Sep 17 00:00:00 2001 From: Maxence Lange Date: Thu, 3 Nov 2022 11:13:41 -0100 Subject: [PATCH] cs:fix Signed-off-by: Maxence Lange --- lib/Command/Fediverse.php | 4 +-- lib/Command/MigrateAlpha3.php | 4 +-- lib/Command/NoteCreate.php | 12 ++++---- lib/Command/QueueStatus.php | 2 +- lib/Db/ActorsRequest.php | 8 ++--- lib/Db/ActorsRequestBuilder.php | 2 +- lib/Db/CacheActorsRequest.php | 4 +-- lib/Db/ClientRequest.php | 2 +- lib/Db/CoreRequestBuilder.php | 4 +-- lib/Db/RequestQueueRequest.php | 10 +++--- lib/Db/SocialCrossQueryBuilder.php | 6 ++-- lib/Db/SocialFiltersQueryBuilder.php | 2 -- lib/Db/SocialLimitsQueryBuilder.php | 2 -- lib/Db/StreamActionsRequest.php | 8 ++--- lib/Db/StreamQueueRequest.php | 6 ++-- lib/Db/StreamRequest.php | 34 ++++++++++----------- lib/Db/StreamRequestBuilder.php | 8 ++--- lib/Interfaces/IActivityPubInterface.php | 1 - lib/Interfaces/Object/AnnounceInterface.php | 1 - lib/Interfaces/Object/LikeInterface.php | 1 - lib/Search/UnifiedSearchResult.php | 2 -- lib/Service/ConfigService.php | 4 +-- lib/Service/RequestQueueService.php | 1 - lib/Service/StreamQueueService.php | 1 - lib/Service/StreamService.php | 4 +-- lib/Tools/Db/ExtendedQueryBuilder.php | 2 -- lib/Tools/Db/RequestBuilder.php | 2 -- lib/Tools/IDeserializable.php | 1 - lib/Tools/IExtendedQueryBuilder.php | 2 -- lib/Tools/IInteractiveShellClient.php | 2 -- lib/Tools/IQueryRow.php | 1 - lib/Tools/Model/Request.php | 4 +-- lib/Tools/Traits/TAsync.php | 2 -- lib/Tools/Traits/TFileTools.php | 1 - lib/Tools/Traits/TNCLogger.php | 24 +++++++-------- lib/Tools/Traits/TNCRequest.php | 18 +++++------ lib/Tools/Traits/TPathTools.php | 1 - lib/Tools/Traits/TRequest.php | 16 +++++----- lib/Tools/Traits/TStringTools.php | 2 -- lib/Traits/TDetails.php | 2 -- 40 files changed, 87 insertions(+), 126 deletions(-) diff --git a/lib/Command/Fediverse.php b/lib/Command/Fediverse.php index 5996977c..f4c11956 100644 --- a/lib/Command/Fediverse.php +++ b/lib/Command/Fediverse.php @@ -58,8 +58,8 @@ class Fediverse extends Base { parent::configure(); $this->setName('social:fediverse') ->addOption( - 'type', 't', InputArgument::OPTIONAL, - 'Change the type of access management', '' + 'type', 't', InputArgument::OPTIONAL, + 'Change the type of access management', '' ) ->addArgument('action', InputArgument::OPTIONAL, 'add/remove/test address', '') ->addArgument('address', InputArgument::OPTIONAL, 'address/host', '') diff --git a/lib/Command/MigrateAlpha3.php b/lib/Command/MigrateAlpha3.php index 8a9ee936..e59e9a99 100644 --- a/lib/Command/MigrateAlpha3.php +++ b/lib/Command/MigrateAlpha3.php @@ -119,10 +119,10 @@ class MigrateAlpha3 extends Base { $this->setName('social:migrate:alpha3') ->setDescription('Trying to migrate old data to Alpha3') ->addOption( - 'remove-migrated-tables', '', InputOption::VALUE_NONE, 'Remove old table once copy is done' + 'remove-migrated-tables', '', InputOption::VALUE_NONE, 'Remove old table once copy is done' ) ->addOption( - 'force-remove-old-tables', '', InputOption::VALUE_NONE, 'Force remove old tables' + 'force-remove-old-tables', '', InputOption::VALUE_NONE, 'Force remove old tables' ); } diff --git a/lib/Command/NoteCreate.php b/lib/Command/NoteCreate.php index f719a2cc..b0e990b9 100644 --- a/lib/Command/NoteCreate.php +++ b/lib/Command/NoteCreate.php @@ -96,18 +96,18 @@ class NoteCreate extends Base { parent::configure(); $this->setName('social:note:create') ->addOption( - 'replyTo', 'r', InputOption::VALUE_OPTIONAL, 'in reply to an existing thread' + 'replyTo', 'r', InputOption::VALUE_OPTIONAL, 'in reply to an existing thread' ) ->addOption( - 'to', 't', InputOption::VALUE_OPTIONAL, 'mentioning people' + 'to', 't', InputOption::VALUE_OPTIONAL, 'mentioning people' ) ->addOption( - 'type', 'y', InputOption::VALUE_OPTIONAL, - 'type: public (default), followers, unlisted, direct' + 'type', 'y', InputOption::VALUE_OPTIONAL, + 'type: public (default), followers, unlisted, direct' ) ->addOption( - 'hashtag', 'g', InputOption::VALUE_OPTIONAL, - 'hashtag, without the leading #' + 'hashtag', 'g', InputOption::VALUE_OPTIONAL, + 'hashtag, without the leading #' ) ->addArgument('user_id', InputArgument::REQUIRED, 'userId of the author') ->addArgument('content', InputArgument::REQUIRED, 'content of the post') diff --git a/lib/Command/QueueStatus.php b/lib/Command/QueueStatus.php index 7d9606c0..67e256be 100644 --- a/lib/Command/QueueStatus.php +++ b/lib/Command/QueueStatus.php @@ -73,7 +73,7 @@ class QueueStatus extends Base { parent::configure(); $this->setName('social:queue:status') ->addOption( - 'token', 't', InputOption::VALUE_OPTIONAL, 'token of a request' + 'token', 't', InputOption::VALUE_OPTIONAL, 'token of a request' ) ->setDescription('Return status on the request queue'); } diff --git a/lib/Db/ActorsRequest.php b/lib/Db/ActorsRequest.php index 915791f6..f0b6178c 100644 --- a/lib/Db/ActorsRequest.php +++ b/lib/Db/ActorsRequest.php @@ -38,8 +38,6 @@ use OCA\Social\Model\ActivityPub\Actor\Person; use OCP\DB\QueryBuilder\IQueryBuilder; class ActorsRequest extends ActorsRequestBuilder { - - /** * Create a new Person in the database. * @throws SocialAppConfigException @@ -55,13 +53,13 @@ class ActorsRequest extends ActorsRequestBuilder { ->setValue('summary', $qb->createNamedParameter($actor->getSummary())) ->setValue('avatar_version', $qb->createNamedParameter($actor->getAvatarVersion())) ->setValue( - 'preferred_username', $qb->createNamedParameter($actor->getPreferredUsername()) + 'preferred_username', $qb->createNamedParameter($actor->getPreferredUsername()) ) ->setValue('public_key', $qb->createNamedParameter($actor->getPublicKey())) ->setValue('private_key', $qb->createNamedParameter($actor->getPrivateKey())) ->setValue( - 'creation', - $qb->createNamedParameter(new DateTime('now'), IQueryBuilder::PARAM_DATE) + 'creation', + $qb->createNamedParameter(new DateTime('now'), IQueryBuilder::PARAM_DATE) ); $qb->executeStatement(); diff --git a/lib/Db/ActorsRequestBuilder.php b/lib/Db/ActorsRequestBuilder.php index 42e3df21..ee6ad7b0 100644 --- a/lib/Db/ActorsRequestBuilder.php +++ b/lib/Db/ActorsRequestBuilder.php @@ -121,7 +121,7 @@ class ActorsRequestBuilder extends CoreRequestBuilder { ->setLocal(true) ->setAvatarVersion($this->getInt('avatar_version', $data, -1)) ->setAccount( - $actor->getPreferredUsername() . '@' . $this->configService->getSocialAddress() + $actor->getPreferredUsername() . '@' . $this->configService->getSocialAddress() ); $actor->setUrlSocial($root) ->setUrl($actor->getId()); diff --git a/lib/Db/CacheActorsRequest.php b/lib/Db/CacheActorsRequest.php index 35f65c19..0027545d 100644 --- a/lib/Db/CacheActorsRequest.php +++ b/lib/Db/CacheActorsRequest.php @@ -59,7 +59,7 @@ class CacheActorsRequest extends CacheActorsRequestBuilder { ->setValue('featured', $qb->createNamedParameter($actor->getFeatured())) ->setValue('url', $qb->createNamedParameter($actor->getUrl())) ->setValue( - 'preferred_username', $qb->createNamedParameter($actor->getPreferredUsername()) + 'preferred_username', $qb->createNamedParameter($actor->getPreferredUsername()) ) ->setValue('name', $qb->createNamedParameter($actor->getName())) ->setValue('summary', $qb->createNamedParameter($actor->getSummary())) @@ -112,7 +112,7 @@ class CacheActorsRequest extends CacheActorsRequestBuilder { ->set('featured', $qb->createNamedParameter($actor->getFeatured())) ->set('url', $qb->createNamedParameter($actor->getUrl())) ->set( - 'preferred_username', $qb->createNamedParameter($actor->getPreferredUsername()) + 'preferred_username', $qb->createNamedParameter($actor->getPreferredUsername()) ) ->set('name', $qb->createNamedParameter($actor->getName())) ->set('summary', $qb->createNamedParameter($actor->getSummary())) diff --git a/lib/Db/ClientRequest.php b/lib/Db/ClientRequest.php index ad8b0a12..162caada 100644 --- a/lib/Db/ClientRequest.php +++ b/lib/Db/ClientRequest.php @@ -56,7 +56,7 @@ class ClientRequest extends ClientRequestBuilder { $qb->setValue('app_name', $qb->createNamedParameter($client->getAppName())) ->setValue('app_website', $qb->createNamedParameter($client->getAppWebsite())) ->setValue( - 'app_redirect_uris', $qb->createNamedParameter(json_encode($client->getAppRedirectUris())) + 'app_redirect_uris', $qb->createNamedParameter(json_encode($client->getAppRedirectUris())) ) ->setValue('app_client_id', $qb->createNamedParameter($client->getAppClientId())) ->setValue('app_client_secret', $qb->createNamedParameter($client->getAppClientSecret())) diff --git a/lib/Db/CoreRequestBuilder.php b/lib/Db/CoreRequestBuilder.php index 3c22f7af..727bea99 100644 --- a/lib/Db/CoreRequestBuilder.php +++ b/lib/Db/CoreRequestBuilder.php @@ -1052,8 +1052,8 @@ class CoreRequestBuilder { ->selectAlias($prefix . '_f.follow_id', $prefix . '_follow_id') ->selectAlias($prefix . '_f.creation', $prefix . '_creation') ->leftJoin( - $this->defaultSelectAlias, CoreRequestBuilder::TABLE_FOLLOWS, $prefix . '_f', - $andX + $this->defaultSelectAlias, CoreRequestBuilder::TABLE_FOLLOWS, $prefix . '_f', + $andX ); } diff --git a/lib/Db/RequestQueueRequest.php b/lib/Db/RequestQueueRequest.php index d043038d..9cb1f908 100644 --- a/lib/Db/RequestQueueRequest.php +++ b/lib/Db/RequestQueueRequest.php @@ -66,9 +66,9 @@ class RequestQueueRequest extends RequestQueueRequestBuilder { ->setValue('author', $qb->createNamedParameter($queue->getAuthor())) ->setValue('activity', $qb->createNamedParameter($queue->getActivity())) ->setValue( - 'instance', $qb->createNamedParameter( - json_encode($queue->getInstance(), JSON_UNESCAPED_SLASHES) - ) + 'instance', $qb->createNamedParameter( + json_encode($queue->getInstance(), JSON_UNESCAPED_SLASHES) + ) ) ->setValue('priority', $qb->createNamedParameter($queue->getPriority())) ->setValue('status', $qb->createNamedParameter($queue->getStatus())) @@ -133,8 +133,8 @@ class RequestQueueRequest extends RequestQueueRequestBuilder { $qb = $this->getRequestQueueUpdateSql(); $qb->set('status', $qb->createNamedParameter(RequestQueue::STATUS_RUNNING)) ->set( - 'last', - $qb->createNamedParameter(new DateTime('now'), IQueryBuilder::PARAM_DATE) + 'last', + $qb->createNamedParameter(new DateTime('now'), IQueryBuilder::PARAM_DATE) ); $this->limitToId($qb, $queue->getId()); $this->limitToStatus($qb, RequestQueue::STATUS_STANDBY); diff --git a/lib/Db/SocialCrossQueryBuilder.php b/lib/Db/SocialCrossQueryBuilder.php index 570fc673..bf76c02a 100644 --- a/lib/Db/SocialCrossQueryBuilder.php +++ b/lib/Db/SocialCrossQueryBuilder.php @@ -45,8 +45,6 @@ use OCP\DB\QueryBuilder\ICompositeExpression; * @package OCA\Social\Db */ class SocialCrossQueryBuilder extends SocialCoreQueryBuilder { - - /** * @param string $aliasDest * @param string $aliasFollowing @@ -187,8 +185,8 @@ class SocialCrossQueryBuilder extends SocialCoreQueryBuilder { ->selectAlias('cd.error', 'cachedocument_error') ->selectAlias('cd.creation', 'cachedocument_creation') ->leftJoin( - $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_CACHE_DOCUMENTS, 'cd', - $expr->eq($func->lower($pf . '.' . $fieldDocumentId), $func->lower('cd.id')) + $this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_CACHE_DOCUMENTS, 'cd', + $expr->eq($func->lower($pf . '.' . $fieldDocumentId), $func->lower('cd.id')) ); } diff --git a/lib/Db/SocialFiltersQueryBuilder.php b/lib/Db/SocialFiltersQueryBuilder.php index df9c22ae..a547b870 100644 --- a/lib/Db/SocialFiltersQueryBuilder.php +++ b/lib/Db/SocialFiltersQueryBuilder.php @@ -37,8 +37,6 @@ namespace OCA\Social\Db; * @package OCA\Social\Db */ class SocialFiltersQueryBuilder extends SocialLimitsQueryBuilder { - - /** * */ diff --git a/lib/Db/SocialLimitsQueryBuilder.php b/lib/Db/SocialLimitsQueryBuilder.php index 218b3775..f0c1cec5 100644 --- a/lib/Db/SocialLimitsQueryBuilder.php +++ b/lib/Db/SocialLimitsQueryBuilder.php @@ -45,8 +45,6 @@ use OCP\DB\QueryBuilder\ICompositeExpression; * @package OCA\Social\Db */ class SocialLimitsQueryBuilder extends SocialCrossQueryBuilder { - - /** * Limit the request to the Type * diff --git a/lib/Db/StreamActionsRequest.php b/lib/Db/StreamActionsRequest.php index 37ca8a08..cbea36a0 100644 --- a/lib/Db/StreamActionsRequest.php +++ b/lib/Db/StreamActionsRequest.php @@ -40,8 +40,6 @@ use OCA\Social\Model\StreamAction; * @package OCA\Social\Db */ class StreamActionsRequest extends StreamActionsRequestBuilder { - - /** * Create a new Queue in the database. */ @@ -58,9 +56,9 @@ class StreamActionsRequest extends StreamActionsRequestBuilder { ->setValue('stream_id', $qb->createNamedParameter($action->getStreamId())) ->setValue('stream_id_prim', $qb->createNamedParameter($this->prim($action->getStreamId()))) ->setValue( - 'values', $qb->createNamedParameter( - json_encode($values, JSON_UNESCAPED_SLASHES) - ) + 'values', $qb->createNamedParameter( + json_encode($values, JSON_UNESCAPED_SLASHES) + ) ) ->setValue('liked', $qb->createNamedParameter(($liked) ? 1 : 0)) ->setValue('boosted', $qb->createNamedParameter(($boosted) ? 1 : 0)) diff --git a/lib/Db/StreamQueueRequest.php b/lib/Db/StreamQueueRequest.php index 5c66b557..1bfadf32 100644 --- a/lib/Db/StreamQueueRequest.php +++ b/lib/Db/StreamQueueRequest.php @@ -42,8 +42,6 @@ use OCP\DB\QueryBuilder\IQueryBuilder; * @package OCA\Social\Db */ class StreamQueueRequest extends StreamQueueRequestBuilder { - - /** * create a new Queue in the database. * @@ -112,8 +110,8 @@ class StreamQueueRequest extends StreamQueueRequestBuilder { $qb = $this->getStreamQueueUpdateSql(); $qb->set('status', $qb->createNamedParameter(StreamQueue::STATUS_RUNNING)) ->set( - 'last', - $qb->createNamedParameter(new DateTime('now'), IQueryBuilder::PARAM_DATE) + 'last', + $qb->createNamedParameter(new DateTime('now'), IQueryBuilder::PARAM_DATE) ); $this->limitToId($qb, $queue->getId()); $this->limitToStatus($qb, StreamQueue::STATUS_STANDBY); diff --git a/lib/Db/StreamRequest.php b/lib/Db/StreamRequest.php index 821c3616..b300328c 100644 --- a/lib/Db/StreamRequest.php +++ b/lib/Db/StreamRequest.php @@ -76,7 +76,7 @@ class StreamRequest extends StreamRequestBuilder { /** @var Note $stream */ $qb->setValue('hashtags', $qb->createNamedParameter(json_encode($stream->getHashtags()))) ->setValue('attachments', $qb->createNamedParameter( - json_encode($stream->getAttachments(), JSON_UNESCAPED_SLASHES) + json_encode($stream->getAttachments(), JSON_UNESCAPED_SLASHES) )); } @@ -680,19 +680,19 @@ class StreamRequest extends StreamRequestBuilder { ->setValue('subtype', $qb->createNamedParameter($stream->getSubType())) ->setValue('to', $qb->createNamedParameter($stream->getTo())) ->setValue( - 'to_array', $qb->createNamedParameter( - json_encode($stream->getToArray(), JSON_UNESCAPED_SLASHES) - ) + 'to_array', $qb->createNamedParameter( + json_encode($stream->getToArray(), JSON_UNESCAPED_SLASHES) + ) ) ->setValue( - 'cc', $qb->createNamedParameter( - json_encode($stream->getCcArray(), JSON_UNESCAPED_SLASHES) - ) + 'cc', $qb->createNamedParameter( + json_encode($stream->getCcArray(), JSON_UNESCAPED_SLASHES) + ) ) ->setValue( - 'bcc', $qb->createNamedParameter( - json_encode($stream->getBccArray(), JSON_UNESCAPED_SLASHES) - ) + 'bcc', $qb->createNamedParameter( + json_encode($stream->getBccArray(), JSON_UNESCAPED_SLASHES) + ) ) ->setValue('content', $qb->createNamedParameter($stream->getContent())) ->setValue('summary', $qb->createNamedParameter($stream->getSummary())) @@ -708,13 +708,13 @@ class StreamRequest extends StreamRequestBuilder { ->setValue('details', $qb->createNamedParameter(json_encode($stream->getDetailsAll()))) ->setValue('cache', $qb->createNamedParameter($cache)) ->setValue( - 'filter_duplicate', - $qb->createNamedParameter(($stream->isFilterDuplicate()) ? '1' : '0') + 'filter_duplicate', + $qb->createNamedParameter(($stream->isFilterDuplicate()) ? '1' : '0') ) ->setValue( - 'instances', $qb->createNamedParameter( - json_encode($stream->getInstancePaths(), JSON_UNESCAPED_SLASHES) - ) + 'instances', $qb->createNamedParameter( + json_encode($stream->getInstancePaths(), JSON_UNESCAPED_SLASHES) + ) ) ->setValue('local', $qb->createNamedParameter(($stream->isLocal()) ? '1' : '0')); @@ -725,8 +725,8 @@ class StreamRequest extends StreamRequestBuilder { 'published_time', $qb->createNamedParameter($dTime, IQueryBuilder::PARAM_DATE) ) ->setValue( - 'creation', - $qb->createNamedParameter(new DateTime('now'), IQueryBuilder::PARAM_DATE) + 'creation', + $qb->createNamedParameter(new DateTime('now'), IQueryBuilder::PARAM_DATE) ); } catch (Exception $e) { } diff --git a/lib/Db/StreamRequestBuilder.php b/lib/Db/StreamRequestBuilder.php index ba3323de..634d2db1 100644 --- a/lib/Db/StreamRequestBuilder.php +++ b/lib/Db/StreamRequestBuilder.php @@ -92,10 +92,10 @@ class StreamRequestBuilder extends CoreRequestBuilder { /** @noinspection PhpMethodParametersCountMismatchInspection */ $qb->selectDistinct('s.id') ->addSelect( - 's.nid', 's.type', 's.subtype', 's.to', 's.to_array', 's.cc', 's.bcc', 's.content', - 's.summary', 's.attachments', 's.published', 's.published_time', 's.cache', - 's.object_id', 's.attributed_to', 's.in_reply_to', 's.source', 's.local', - 's.instances', 's.creation', 's.filter_duplicate', 's.details', 's.hashtags' + 's.nid', 's.type', 's.subtype', 's.to', 's.to_array', 's.cc', 's.bcc', 's.content', + 's.summary', 's.attachments', 's.published', 's.published_time', 's.cache', + 's.object_id', 's.attributed_to', 's.in_reply_to', 's.source', 's.local', + 's.instances', 's.creation', 's.filter_duplicate', 's.details', 's.hashtags' ) ->from(self::TABLE_STREAM, 's'); diff --git a/lib/Interfaces/IActivityPubInterface.php b/lib/Interfaces/IActivityPubInterface.php index 2c1d8d55..311c7ea4 100644 --- a/lib/Interfaces/IActivityPubInterface.php +++ b/lib/Interfaces/IActivityPubInterface.php @@ -41,7 +41,6 @@ use OCA\Social\Model\ActivityPub\ACore; * @package OCA\Social\Service */ interface IActivityPubInterface { - /** * Freshly imported item can be processed/parsed on incoming Request. */ diff --git a/lib/Interfaces/Object/AnnounceInterface.php b/lib/Interfaces/Object/AnnounceInterface.php index c5642391..411f22b2 100644 --- a/lib/Interfaces/Object/AnnounceInterface.php +++ b/lib/Interfaces/Object/AnnounceInterface.php @@ -316,7 +316,6 @@ class AnnounceInterface extends AbstractActivityPubInterface implements IActivit $notification->addDetail('accounts', $author->getAccount()); $notificationInterface->update($notification); } catch (StreamNotFoundException $e) { - /** @var SocialAppNotification $notification */ $notification = AP::$activityPub->getItemFromType(SocialAppNotification::TYPE); // $notification->setDetail('url', ''); diff --git a/lib/Interfaces/Object/LikeInterface.php b/lib/Interfaces/Object/LikeInterface.php index 456f2a99..e58a462d 100644 --- a/lib/Interfaces/Object/LikeInterface.php +++ b/lib/Interfaces/Object/LikeInterface.php @@ -200,7 +200,6 @@ class LikeInterface extends AbstractActivityPubInterface implements IActivityPub $notification->addDetail('accounts', $author->getAccount()); $notificationInterface->update($notification); } catch (StreamNotFoundException $e) { - /** @var SocialAppNotification $notification */ $notification = AP::$activityPub->getItemFromType(SocialAppNotification::TYPE); // $notification->setDetail('url', ''); diff --git a/lib/Search/UnifiedSearchResult.php b/lib/Search/UnifiedSearchResult.php index 7fc7c97f..0fce65fc 100644 --- a/lib/Search/UnifiedSearchResult.php +++ b/lib/Search/UnifiedSearchResult.php @@ -39,8 +39,6 @@ use OCP\Search\SearchResultEntry; * @package OCA\Social\Search */ class UnifiedSearchResult extends SearchResultEntry { - - /** * UnifiedSearchResult constructor. * diff --git a/lib/Service/ConfigService.php b/lib/Service/ConfigService.php index 1c2a852f..6f6f41ff 100644 --- a/lib/Service/ConfigService.php +++ b/lib/Service/ConfigService.php @@ -381,8 +381,8 @@ class ConfigService { public function setSocialUrl(string $url = '') { if ($url === '') { $url = $this->getCloudUrl(true) . $this->urlGenerator->linkToRoute( - 'social.Navigation.navigate' - ); + 'social.Navigation.navigate' + ); } if (parse_url($url, PHP_URL_SCHEME) === null) { diff --git a/lib/Service/RequestQueueService.php b/lib/Service/RequestQueueService.php index c4d32003..80e43f39 100644 --- a/lib/Service/RequestQueueService.php +++ b/lib/Service/RequestQueueService.php @@ -114,7 +114,6 @@ class RequestQueueService { $request = $requests[0]; switch ($request->getPriority()) { - case InstancePath::PRIORITY_TOP: return $request; diff --git a/lib/Service/StreamQueueService.php b/lib/Service/StreamQueueService.php index 5fb17eeb..ae84a984 100644 --- a/lib/Service/StreamQueueService.php +++ b/lib/Service/StreamQueueService.php @@ -202,7 +202,6 @@ class StreamQueueService { $cache = $stream->getCache(); foreach ($cache->getItems() as $item) { - // TODO: PHP7.2 (NC16) : multiple exception per catch try { diff --git a/lib/Service/StreamService.php b/lib/Service/StreamService.php index c2604db5..4466c397 100644 --- a/lib/Service/StreamService.php +++ b/lib/Service/StreamService.php @@ -269,8 +269,8 @@ class StreamService { [ 'type' => 'Hashtag', 'href' => $this->configService->getSocialUrl() . 'tag/' . strtolower( - $hashtag - ), + $hashtag + ), 'name' => '#' . $hashtag ] ); diff --git a/lib/Tools/Db/ExtendedQueryBuilder.php b/lib/Tools/Db/ExtendedQueryBuilder.php index ecea036b..32f5d0a6 100644 --- a/lib/Tools/Db/ExtendedQueryBuilder.php +++ b/lib/Tools/Db/ExtendedQueryBuilder.php @@ -49,8 +49,6 @@ use OCP\DB\QueryBuilder\IQueryBuilder; * @package OCA\Social\Tools\Db */ class ExtendedQueryBuilder extends QueryBuilder implements IExtendedQueryBuilder { - - /** @var string */ private $defaultSelectAlias = ''; diff --git a/lib/Tools/Db/RequestBuilder.php b/lib/Tools/Db/RequestBuilder.php index dc2b4757..eba9ed58 100644 --- a/lib/Tools/Db/RequestBuilder.php +++ b/lib/Tools/Db/RequestBuilder.php @@ -43,8 +43,6 @@ use OCP\DB\QueryBuilder\IQueryBuilder; * @package OCA\Social\Tools\Db */ class RequestBuilder { - - /** @var string */ protected $defaultSelectAlias; diff --git a/lib/Tools/IDeserializable.php b/lib/Tools/IDeserializable.php index d779dc9f..509ec8df 100644 --- a/lib/Tools/IDeserializable.php +++ b/lib/Tools/IDeserializable.php @@ -32,7 +32,6 @@ declare(strict_types=1); namespace OCA\Social\Tools; interface IDeserializable { - /** * @param array $data * diff --git a/lib/Tools/IExtendedQueryBuilder.php b/lib/Tools/IExtendedQueryBuilder.php index 80c23ff8..e8ef3ac4 100644 --- a/lib/Tools/IExtendedQueryBuilder.php +++ b/lib/Tools/IExtendedQueryBuilder.php @@ -43,8 +43,6 @@ use OCP\DB\QueryBuilder\IQueryBuilder; * @package OCA\Social\Tools */ interface IExtendedQueryBuilder extends IQueryBuilder { - - /** * @param string $alias * diff --git a/lib/Tools/IInteractiveShellClient.php b/lib/Tools/IInteractiveShellClient.php index 076c2388..9f189057 100644 --- a/lib/Tools/IInteractiveShellClient.php +++ b/lib/Tools/IInteractiveShellClient.php @@ -42,8 +42,6 @@ use OCA\Social\Tools\Exceptions\ShellUnknownItemException; * @package OCA\Social\Tools */ interface IInteractiveShellClient { - - /** * @param string $source * @param string $field diff --git a/lib/Tools/IQueryRow.php b/lib/Tools/IQueryRow.php index 92108399..3b714391 100644 --- a/lib/Tools/IQueryRow.php +++ b/lib/Tools/IQueryRow.php @@ -38,7 +38,6 @@ namespace OCA\Social\Tools; * @package OCA\Social\Tools */ interface IQueryRow { - /** * import data to feed the model. * diff --git a/lib/Tools/Model/Request.php b/lib/Tools/Model/Request.php index 1ee6763f..0f9c9fc4 100644 --- a/lib/Tools/Model/Request.php +++ b/lib/Tools/Model/Request.php @@ -693,8 +693,8 @@ class Request implements JsonSerializable { case self::QS_VAR_DUPLICATE: default: return '?' . preg_replace( - '/%5B(?:[0-9]|[1-9][0-9]+)%5D=/', '=', http_build_query($this->getParams()) - ); + '/%5B(?:[0-9]|[1-9][0-9]+)%5D=/', '=', http_build_query($this->getParams()) + ); } } diff --git a/lib/Tools/Traits/TAsync.php b/lib/Tools/Traits/TAsync.php index e025f079..6511a476 100644 --- a/lib/Tools/Traits/TAsync.php +++ b/lib/Tools/Traits/TAsync.php @@ -40,8 +40,6 @@ use JsonSerializable; * @package OCA\Social\Tools\Traits */ trait TAsync { - - /** * Hacky way to async the rest of the process without keeping client on hold. * diff --git a/lib/Tools/Traits/TFileTools.php b/lib/Tools/Traits/TFileTools.php index 218e505b..25128361 100644 --- a/lib/Tools/Traits/TFileTools.php +++ b/lib/Tools/Traits/TFileTools.php @@ -37,7 +37,6 @@ namespace OCA\Social\Tools\Traits; * @package OCA\Social\Tools\Traits */ trait TFileTools { - /** * @param $stream * diff --git a/lib/Tools/Traits/TNCLogger.php b/lib/Tools/Traits/TNCLogger.php index 57bec246..2fa7d451 100644 --- a/lib/Tools/Traits/TNCLogger.php +++ b/lib/Tools/Traits/TNCLogger.php @@ -71,12 +71,12 @@ trait TNCLogger { $this->logger() ->log( - $level, - $message, - [ - 'app' => $this->setup('app'), - 'exception' => $t - ] + $level, + $message, + [ + 'app' => $this->setup('app'), + 'exception' => $t + ] ); } @@ -111,12 +111,12 @@ trait TNCLogger { $this->logger() ->log( - $level, - $message, - [ - 'app' => $this->setup('app'), - 'exception' => $e - ] + $level, + $message, + [ + 'app' => $this->setup('app'), + 'exception' => $e + ] ); } diff --git a/lib/Tools/Traits/TNCRequest.php b/lib/Tools/Traits/TNCRequest.php index b59a540e..0431d9a1 100644 --- a/lib/Tools/Traits/TNCRequest.php +++ b/lib/Tools/Traits/TNCRequest.php @@ -44,8 +44,6 @@ use OCA\Social\Tools\Model\Request; * @package OCA\Social\Tools\Traits */ trait TNCRequest { - - /** @var int */ private $maxDownloadSize = 100; @@ -150,14 +148,14 @@ trait TNCRequest { curl_setopt($curl, CURLOPT_BUFFERSIZE, 128); curl_setopt($curl, CURLOPT_NOPROGRESS, false); curl_setopt( - /** - * @param $downloadSize - * @param int $downloaded - * @param $uploadSize - * @param int $uploaded - * - * @return int - */ + /** + * @param $downloadSize + * @param int $downloaded + * @param $uploadSize + * @param int $uploaded + * + * @return int + */ $curl, CURLOPT_PROGRESSFUNCTION, function ($downloadSize, int $downloaded, $uploadSize, int $uploaded) { if ($downloaded > ($this->maxDownloadSize * (1024 * 1024))) { diff --git a/lib/Tools/Traits/TPathTools.php b/lib/Tools/Traits/TPathTools.php index 4ac7c10f..2de5cf71 100644 --- a/lib/Tools/Traits/TPathTools.php +++ b/lib/Tools/Traits/TPathTools.php @@ -38,7 +38,6 @@ namespace OCA\Social\Tools\Traits; * @package OCA\Social\Tools\Traits */ trait TPathTools { - /** * @param string $path * diff --git a/lib/Tools/Traits/TRequest.php b/lib/Tools/Traits/TRequest.php index 5694420b..4b7c26aa 100644 --- a/lib/Tools/Traits/TRequest.php +++ b/lib/Tools/Traits/TRequest.php @@ -144,14 +144,14 @@ trait TRequest { curl_setopt($curl, CURLOPT_BUFFERSIZE, 128); curl_setopt($curl, CURLOPT_NOPROGRESS, false); curl_setopt( - /** - * @param $downloadSize - * @param int $downloaded - * @param $uploadSize - * @param int $uploaded - * - * @return int - */ + /** + * @param $downloadSize + * @param int $downloaded + * @param $uploadSize + * @param int $uploaded + * + * @return int + */ $curl, CURLOPT_PROGRESSFUNCTION, function ($downloadSize, int $downloaded, $uploadSize, int $uploaded) { if ($downloaded > ($this->maxDownloadSize * (1024 * 1024))) { diff --git a/lib/Tools/Traits/TStringTools.php b/lib/Tools/Traits/TStringTools.php index cb5514cc..bbac2f37 100644 --- a/lib/Tools/Traits/TStringTools.php +++ b/lib/Tools/Traits/TStringTools.php @@ -39,8 +39,6 @@ use Exception; * @package OCA\Social\Tools\Traits */ trait TStringTools { - - /** * @param int $length * diff --git a/lib/Traits/TDetails.php b/lib/Traits/TDetails.php index 5d35a990..ac0ad2be 100644 --- a/lib/Traits/TDetails.php +++ b/lib/Traits/TDetails.php @@ -39,8 +39,6 @@ use OCA\Social\Model\ActivityPub\Item; * @package OCA\Social\Traits */ trait TDetails { - - /** @var array */ private $details = [];