From: Michael Date: Thu, 5 Oct 2023 09:25:23 +0000 (+0000) Subject: Remove unneeded functions X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=aae5f006f9750c487e68e622fd112ea3da260d08;p=friendica.git Remove unneeded functions --- diff --git a/src/Content/Conversation/Factory/Channel.php b/src/Content/Conversation/Factory/Channel.php index e151c99287..1a788d725c 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 a21eb8d4eb..e08352d631 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 873cb150c5..8b71a96190 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 *