]> git.mxchange.org Git - friendica.git/commitdiff
simplify GServer repository
authorArt4 <art4@wlabs.de>
Fri, 7 Mar 2025 13:49:22 +0000 (13:49 +0000)
committerArt4 <art4@wlabs.de>
Fri, 7 Mar 2025 13:49:22 +0000 (13:49 +0000)
src/Federation/Repository/GServer.php

index d9d777258270b484c42052afa11da9e81ebe1c97..d2992108004ad9d473ebbded39eaad8c6444c28b 100644 (file)
@@ -11,22 +11,18 @@ use Friendica\Database\Database;
 use Friendica\Federation\Entity\GServer as GServerEntity;
 use Friendica\Federation\Factory\GServer as GServerFactory;
 use Friendica\Network\HTTPException\NotFoundException;
-use Psr\Log\LoggerInterface;
 
 final class GServer
 {
-       protected static $table_name = 'gserver';
+       private string $table_name = 'gserver';
 
-       protected Database $db;
+       private Database $db;
 
-       protected LoggerInterface $logger;
+       private GServerFactory $factory;
 
-       protected GServerFactory $factory;
-
-       public function __construct(Database $database, LoggerInterface $logger, GServerFactory $factory)
+       public function __construct(Database $database, GServerFactory $factory)
        {
                $this->db      = $database;
-               $this->logger  = $logger;
                $this->factory = $factory;
        }
 
@@ -37,7 +33,7 @@ final class GServer
         */
        public function selectOneById(int $gsid): GServerEntity
        {
-               $fields = $this->db->selectFirst(static::$table_name, [], ['id' => $gsid], []);
+               $fields = $this->db->selectFirst($this->table_name, [], ['id' => $gsid], []);
 
                if (!$this->db->isResult($fields)) {
                        throw new NotFoundException();