From aae5f006f9750c487e68e622fd112ea3da260d08 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 5 Oct 2023 09:25:23 +0000 Subject: [PATCH] Remove unneeded functions --- src/Content/Conversation/Factory/Channel.php | 20 +--------------- .../Conversation/Factory/Community.php | 23 +------------------ src/Content/Conversation/Factory/Network.php | 17 -------------- 3 files changed, 2 insertions(+), 58 deletions(-) diff --git a/src/Content/Conversation/Factory/Channel.php b/src/Content/Conversation/Factory/Channel.php index e151c9928..1a788d725 100644 --- a/src/Content/Conversation/Factory/Channel.php +++ b/src/Content/Conversation/Factory/Channel.php @@ -24,36 +24,18 @@ 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\Entity\Timeline as TimelineEntity; use Friendica\Content\Conversation\Repository\Channel as ChannelRepository; use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\L10n; use Psr\Log\LoggerInterface; -class Channel extends Timeline +final class Channel extends Timeline { public function __construct(ChannelRepository $channel, L10n $l10n, LoggerInterface $logger, IManageConfigValues $config) { parent::__construct($channel, $l10n, $logger, $config); } - public function createFromTableRow(array $row): TimelineEntity - { - return new TimelineEntity( - $row['id'] ?? null, - $row['label'], - $row['description'] ?? null, - $row['access-key'] ?? null, - null, - $row['uid'], - $row['include-tags'] ?? null, - $row['exclude-tags'] ?? null, - $row['full-text-search'] ?? null, - $row['media-type'] ?? null, - $row['circle'] ?? null, - ); - } - /** * List of available channels * diff --git a/src/Content/Conversation/Factory/Community.php b/src/Content/Conversation/Factory/Community.php index a21eb8d4e..e08352d63 100644 --- a/src/Content/Conversation/Factory/Community.php +++ b/src/Content/Conversation/Factory/Community.php @@ -22,41 +22,20 @@ namespace Friendica\Content\Conversation\Factory; use Friendica\Content\Conversation\Collection\Timelines; -use Friendica\Content\Conversation\Entity\Channel as ChannelEntity; use Friendica\Content\Conversation\Entity\Community as CommunityEntity; -use Friendica\Content\Conversation\Entity\Network; -use Friendica\Model\User; -use Friendica\Content\Conversation\Entity\Timeline as TimelineEntity; 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; -class Community extends Timeline +final class Community extends Timeline { public function __construct(Channel $channel, L10n $l10n, LoggerInterface $logger, IManageConfigValues $config) { parent::__construct($channel, $l10n, $logger, $config); } - public function createFromTableRow(array $row): TimelineEntity - { - return new TimelineEntity( - $row['id'] ?? null, - $row['label'], - $row['description'] ?? null, - $row['access-key'] ?? null, - null, - $row['uid'], - $row['include-tags'] ?? null, - $row['exclude-tags'] ?? null, - $row['full-text-search'] ?? null, - $row['media-type'] ?? null, - $row['circle'] ?? null, - ); - } - /** * List of available communities * diff --git a/src/Content/Conversation/Factory/Network.php b/src/Content/Conversation/Factory/Network.php index 873cb150c..8b71a9619 100644 --- a/src/Content/Conversation/Factory/Network.php +++ b/src/Content/Conversation/Factory/Network.php @@ -35,23 +35,6 @@ final class Network extends Timeline parent::__construct($channel, $l10n, $logger, $config); } - public function createFromTableRow(array $row): NetworkEntity - { - return new NetworkEntity( - $row['id'] ?? null, - $row['label'], - $row['description'] ?? null, - $row['access-key'] ?? null, - null, - $row['uid'], - $row['include-tags'] ?? null, - $row['exclude-tags'] ?? null, - $row['full-text-search'] ?? null, - $row['media-type'] ?? null, - $row['circle'] ?? null, - ); - } - /** * List of available network timelines *