From 2f06c2a7e599fe475604d086fb692790abc66e31 Mon Sep 17 00:00:00 2001 From: ghost Date: Mon, 9 Oct 2023 02:03:05 +0300 Subject: [PATCH] update method names --- src/Repository/TorrentLocalesRepository.php | 4 ++-- src/Repository/TorrentSensitiveRepository.php | 4 ++-- src/Service/TorrentService.php | 18 +++++++++--------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/Repository/TorrentLocalesRepository.php b/src/Repository/TorrentLocalesRepository.php index 4cc44a0..4901596 100644 --- a/src/Repository/TorrentLocalesRepository.php +++ b/src/Repository/TorrentLocalesRepository.php @@ -31,7 +31,7 @@ class TorrentLocalesRepository extends ServiceEntityRepository ; } - public function findLastTorrentLocales(int $torrentId): ?TorrentLocales + public function findLastTorrentLocalesByTorrentId(int $torrentId): ?TorrentLocales { return $this->createQueryBuilder('tl') ->where('tl.torrentId = :torrentId') @@ -43,7 +43,7 @@ class TorrentLocalesRepository extends ServiceEntityRepository ; } - public function findTorrentLocales(int $torrentId): array + public function findTorrentLocalesByTorrentId(int $torrentId): array { return $this->createQueryBuilder('tl') ->where('tl.torrentId = :torrentId') diff --git a/src/Repository/TorrentSensitiveRepository.php b/src/Repository/TorrentSensitiveRepository.php index 4829843..8e02e99 100644 --- a/src/Repository/TorrentSensitiveRepository.php +++ b/src/Repository/TorrentSensitiveRepository.php @@ -31,7 +31,7 @@ class TorrentSensitiveRepository extends ServiceEntityRepository ; } - public function findLastTorrentSensitive(int $torrentId): ?TorrentSensitive + public function findLastTorrentSensitiveByTorrentId(int $torrentId): ?TorrentSensitive { return $this->createQueryBuilder('ts') ->where('ts.torrentId = :torrentId') @@ -43,7 +43,7 @@ class TorrentSensitiveRepository extends ServiceEntityRepository ; } - public function findTorrentSensitive(int $torrentId): array + public function findTorrentSensitiveByTorrentId(int $torrentId): array { return $this->createQueryBuilder('ts') ->where('ts.torrentId = :torrentId') diff --git a/src/Service/TorrentService.php b/src/Service/TorrentService.php index 3bfa4d5..8abf189 100644 --- a/src/Service/TorrentService.php +++ b/src/Service/TorrentService.php @@ -165,7 +165,7 @@ class TorrentService { return $this->entityManagerInterface ->getRepository(Torrent::class) - ->findOneByIdField($id); + ->getTorrent($id); } public function addTorrent( @@ -196,18 +196,18 @@ class TorrentService ->getTorrentLocales($id); } - public function findLastTorrentLocales(int $torrentId): ?TorrentLocales + public function findLastTorrentLocalesByTorrentId(int $torrentId): ?TorrentLocales { return $this->entityManagerInterface ->getRepository(TorrentLocales::class) - ->findLastTorrentLocales($torrentId); + ->findLastTorrentLocalesByTorrentId($torrentId); } - public function findTorrentLocales(int $torrentId): array + public function findTorrentLocalesByTorrentId(int $torrentId): array { return $this->entityManagerInterface ->getRepository(TorrentLocales::class) - ->findTorrentLocales($torrentId); + ->findTorrentLocalesByTorrentId($torrentId); } public function toggleTorrentLocalesApproved( @@ -268,18 +268,18 @@ class TorrentService ->getTorrentSensitive($id); } - public function findLastTorrentSensitive(int $torrentId): ?TorrentSensitive + public function findLastTorrentSensitiveByTorrentId(int $torrentId): ?TorrentSensitive { return $this->entityManagerInterface ->getRepository(TorrentSensitive::class) - ->findLastTorrentSensitive($torrentId); + ->findLastTorrentSensitiveByTorrentId($torrentId); } - public function findTorrentSensitive(int $torrentId): array + public function findTorrentSensitiveByTorrentId(int $torrentId): array { return $this->entityManagerInterface ->getRepository(TorrentSensitive::class) - ->findTorrentSensitive($torrentId); + ->findTorrentSensitiveByTorrentId($torrentId); } public function toggleTorrentSensitiveApproved(