]> git.mxchange.org Git - friendica.git/commitdiff
Remove unneeded functions
authorMichael <heluecht@pirati.ca>
Thu, 5 Oct 2023 09:25:23 +0000 (09:25 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 5 Oct 2023 09:25:23 +0000 (09:25 +0000)
src/Content/Conversation/Factory/Channel.php
src/Content/Conversation/Factory/Community.php
src/Content/Conversation/Factory/Network.php

index e151c99287594769136c10a1fd0ea7f3424d9866..1a788d725c03a7671a6a570f74d719656b3733a6 100644 (file)
@@ -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
         *
index a21eb8d4eb92f79ced35c82be15c2d617d15378a..e08352d631dc8a5fee221e5d3ecc45e1a2858505 100644 (file)
 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
         *
index 873cb150c5a3c15f8eb3e240232f87de1f5c4bac..8b71a961906c2df6e3c4a2dfbd7e865ffc9ed6ce 100644 (file)
@@ -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
         *