From b5df3cb104b144a004adb97ad1a0de9e3c570211 Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 6 Oct 2023 21:08:33 +0000 Subject: [PATCH] Unneeded constructors removed --- src/Content/Conversation/Entity/Channel.php | 5 ----- src/Content/Conversation/Entity/Community.php | 5 ----- src/Content/Conversation/Entity/Network.php | 5 ----- src/Content/Conversation/Entity/UserDefinedChannel.php | 4 ---- src/Content/Conversation/Factory/Channel.php | 9 --------- src/Content/Conversation/Factory/Community.php | 9 --------- src/Content/Conversation/Factory/Network.php | 9 --------- .../Conversation/Factory/UserDefinedChannel.php | 10 +--------- 8 files changed, 1 insertion(+), 55 deletions(-) diff --git a/src/Content/Conversation/Entity/Channel.php b/src/Content/Conversation/Entity/Channel.php index 669309cce..8166b7906 100644 --- a/src/Content/Conversation/Entity/Channel.php +++ b/src/Content/Conversation/Entity/Channel.php @@ -31,9 +31,4 @@ class Channel extends Timeline const VIDEO = 'video'; const AUDIO = 'audio'; const LANGUAGE = 'language'; - - public function __construct(string $code = null, string $label = null, string $description = null, string $accessKey = null, string $path = null, int $uid = null, string $includeTags = null, string $excludeTags = null, string $fullTextSearch = null, int $mediaType = null, int $circle = null) - { - parent::__construct($code, $label, $description, $accessKey, $path, $uid, $includeTags, $excludeTags, $fullTextSearch, $mediaType, $circle); - } } diff --git a/src/Content/Conversation/Entity/Community.php b/src/Content/Conversation/Entity/Community.php index f7faf280b..35c7add33 100644 --- a/src/Content/Conversation/Entity/Community.php +++ b/src/Content/Conversation/Entity/Community.php @@ -25,9 +25,4 @@ final class Community extends Timeline { const LOCAL = 'local'; const GLOBAL = 'global'; - - public function __construct(string $code = null, string $label = null, string $description = null, string $accessKey = null, string $path = null, int $uid = null, string $includeTags = null, string $excludeTags = null, string $fullTextSearch = null, int $mediaType = null, int $circle = null) - { - parent::__construct($code, $label, $description, $accessKey, $path, $uid, $includeTags, $excludeTags, $fullTextSearch, $mediaType, $circle); - } } diff --git a/src/Content/Conversation/Entity/Network.php b/src/Content/Conversation/Entity/Network.php index a212b97b8..75775b7b3 100644 --- a/src/Content/Conversation/Entity/Network.php +++ b/src/Content/Conversation/Entity/Network.php @@ -28,9 +28,4 @@ final class Network extends Timeline const RECEIVED = 'received'; const COMMENTED = 'commented'; const CREATED = 'created'; - - public function __construct(string $code = null, string $label = null, string $description = null, string $accessKey = null, string $path = null, int $uid = null, string $includeTags = null, string $excludeTags = null, string $fullTextSearch = null, int $mediaType = null, int $circle = null) - { - parent::__construct($code, $label, $description, $accessKey, $path, $uid, $includeTags, $excludeTags, $fullTextSearch, $mediaType, $circle); - } } diff --git a/src/Content/Conversation/Entity/UserDefinedChannel.php b/src/Content/Conversation/Entity/UserDefinedChannel.php index 99124086c..3d88c6666 100644 --- a/src/Content/Conversation/Entity/UserDefinedChannel.php +++ b/src/Content/Conversation/Entity/UserDefinedChannel.php @@ -23,8 +23,4 @@ namespace Friendica\Content\Conversation\Entity; class UserDefinedChannel extends Channel { - public function __construct(string $code = null, string $label = null, string $description = null, string $accessKey = null, string $path = null, int $uid = null, string $includeTags = null, string $excludeTags = null, string $fullTextSearch = null, int $mediaType = null, int $circle = null) - { - parent::__construct($code, $label, $description, $accessKey, $path, $uid, $includeTags, $excludeTags, $fullTextSearch, $mediaType, $circle); - } } diff --git a/src/Content/Conversation/Factory/Channel.php b/src/Content/Conversation/Factory/Channel.php index b2ad4048f..f03b58925 100644 --- a/src/Content/Conversation/Factory/Channel.php +++ b/src/Content/Conversation/Factory/Channel.php @@ -24,18 +24,9 @@ namespace Friendica\Content\Conversation\Factory; use Friendica\Content\Conversation\Collection\Timelines; use Friendica\Content\Conversation\Entity\Channel as ChannelEntity; use Friendica\Model\User; -use Friendica\Content\Conversation\Repository\Channel as ChannelRepository; -use Friendica\Core\Config\Capability\IManageConfigValues; -use Friendica\Core\L10n; -use Psr\Log\LoggerInterface; final class Channel extends Timeline { - public function __construct(ChannelRepository $channel, L10n $l10n, LoggerInterface $logger, IManageConfigValues $config) - { - parent::__construct($channel, $l10n, $logger, $config); - } - /** * List of available channels * diff --git a/src/Content/Conversation/Factory/Community.php b/src/Content/Conversation/Factory/Community.php index e08352d63..bd86ce3a9 100644 --- a/src/Content/Conversation/Factory/Community.php +++ b/src/Content/Conversation/Factory/Community.php @@ -23,19 +23,10 @@ namespace Friendica\Content\Conversation\Factory; use Friendica\Content\Conversation\Collection\Timelines; use Friendica\Content\Conversation\Entity\Community as CommunityEntity; -use Friendica\Content\Conversation\Repository\Channel; -use Friendica\Core\Config\Capability\IManageConfigValues; -use Friendica\Core\L10n; use Friendica\Module\Conversation\Community as CommunityModule; -use Psr\Log\LoggerInterface; final class Community extends Timeline { - public function __construct(Channel $channel, L10n $l10n, LoggerInterface $logger, IManageConfigValues $config) - { - parent::__construct($channel, $l10n, $logger, $config); - } - /** * List of available communities * diff --git a/src/Content/Conversation/Factory/Network.php b/src/Content/Conversation/Factory/Network.php index 8b71a9619..d7457a846 100644 --- a/src/Content/Conversation/Factory/Network.php +++ b/src/Content/Conversation/Factory/Network.php @@ -23,18 +23,9 @@ namespace Friendica\Content\Conversation\Factory; use Friendica\Content\Conversation\Collection\Timelines; use Friendica\Content\Conversation\Entity\Network as NetworkEntity; -use Friendica\Content\Conversation\Repository\Channel; -use Friendica\Core\Config\Capability\IManageConfigValues; -use Friendica\Core\L10n; -use Psr\Log\LoggerInterface; final class Network extends Timeline { - public function __construct(Channel $channel, L10n $l10n, LoggerInterface $logger, IManageConfigValues $config) - { - parent::__construct($channel, $l10n, $logger, $config); - } - /** * List of available network timelines * diff --git a/src/Content/Conversation/Factory/UserDefinedChannel.php b/src/Content/Conversation/Factory/UserDefinedChannel.php index cb3e86c1d..1b067d08b 100644 --- a/src/Content/Conversation/Factory/UserDefinedChannel.php +++ b/src/Content/Conversation/Factory/UserDefinedChannel.php @@ -22,18 +22,9 @@ namespace Friendica\Content\Conversation\Factory; use Friendica\Content\Conversation\Collection\Timelines; -use Friendica\Content\Conversation\Repository\Channel as ChannelRepository; -use Friendica\Core\Config\Capability\IManageConfigValues; -use Friendica\Core\L10n; -use Psr\Log\LoggerInterface; final class UserDefinedChannel extends Timeline { - public function __construct(ChannelRepository $channel, L10n $l10n, LoggerInterface $logger, IManageConfigValues $config) - { - parent::__construct($channel, $l10n, $logger, $config); - } - /** * List of available user defined channels * @@ -42,6 +33,7 @@ final class UserDefinedChannel extends Timeline */ public function getForUser(int $uid): Timelines { + $tabs = []; foreach ($this->channelRepository->selectByUid($uid) as $channel) { $tabs[] = $channel; }