Browse Source

update method names

main
ghost 1 year ago
parent
commit
2f06c2a7e5
  1. 4
      src/Repository/TorrentLocalesRepository.php
  2. 4
      src/Repository/TorrentSensitiveRepository.php
  3. 18
      src/Service/TorrentService.php

4
src/Repository/TorrentLocalesRepository.php

@ -31,7 +31,7 @@ class TorrentLocalesRepository extends ServiceEntityRepository @@ -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 @@ -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')

4
src/Repository/TorrentSensitiveRepository.php

@ -31,7 +31,7 @@ class TorrentSensitiveRepository extends ServiceEntityRepository @@ -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 @@ -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')

18
src/Service/TorrentService.php

@ -165,7 +165,7 @@ class TorrentService @@ -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 @@ -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 @@ -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(

Loading…
Cancel
Save