diff --git a/lib/Db/ReaderMapper.php b/lib/Db/ReaderMapper.php index 1f6af8d..ce6b9be 100644 --- a/lib/Db/ReaderMapper.php +++ b/lib/Db/ReaderMapper.php @@ -25,10 +25,10 @@ abstract class ReaderMapper extends QBMapper { /** * @param IDBConnection $db Instance of the Db abstraction layer * @param string $table the name of the table. set this to allow entity - * @param class-string|null $entity the name of the entity that the sql should be mapped to queries without using sql + * @param class-string $entity the name of the entity that the sql should be mapped to queries without using sql * @param Time $time */ - public function __construct(IDBConnection $db, string $table, ?string $entity = null, Time $time) { + public function __construct(IDBConnection $db, string $table, string $entity, Time $time) { parent::__construct($db, $table, $entity); $this->time = $time; } diff --git a/lib/Hooks.php b/lib/Hooks.php index 35cea44..3864fb3 100644 --- a/lib/Hooks.php +++ b/lib/Hooks.php @@ -39,7 +39,7 @@ class Hooks { } } - protected function deleteFile(IDBConnection $connection, int $fileId): void { + protected static function deleteFile(IDBConnection $connection, int $fileId): void { $queryBuilder = $connection->getQueryBuilder(); $queryBuilder->delete('reader_bookmarks')->where('file_id = file_id')->setParameter('file_id', $fileId); $queryBuilder->executeStatement(); @@ -49,7 +49,7 @@ class Hooks { $queryBuilder->executeStatement(); } - protected function deleteUser(IDBConnection $connection, string $userId): void { + protected static function deleteUser(IDBConnection $connection, string $userId): void { $queryBuilder = $connection->getQueryBuilder(); $queryBuilder->delete('reader_bookmarks')->where('user_id = user_id')->setParameter('user_id', $userId); $queryBuilder->executeStatement();