Private
Public Access
1
0

chg: dev: increase the minimum PHP version to the latest major - and massive refactor on back-end, like Controllers and Repositories #4

This commit is contained in:
2026-04-12 08:01:46 +02:00
parent 92bfa5b301
commit c0dcc2896a
12 changed files with 511 additions and 104 deletions

View File

@@ -14,6 +14,7 @@ use App\Entity\Grid;
use App\Entity\GridRow;
use App\Entity\PlayedGame;
use App\Interfaces\RpcManagerInterface;
use App\Repository\PlayedGameRepository;
use DateTime;
use Doctrine\ORM\EntityManagerInterface;
use Exception;
@@ -40,6 +41,7 @@ class RpcManager implements RpcManagerInterface
public function __construct(
private readonly EntityManagerInterface $entityManager,
private readonly LoggerInterface $logger,
private readonly PlayedGameRepository $playedGameRepository,
) {
}
@@ -47,9 +49,7 @@ class RpcManager implements RpcManagerInterface
{
$gameAssoc = is_array($params) ? $params[0] : $params;
$playedGame = $this->entityManager
->getRepository(PlayedGame::class)
->findOneByGameAssoc($gameAssoc);
$playedGame = $this->playedGameRepository->findOneByGameAssoc($gameAssoc);
if (null === $playedGame) {
try {
@@ -77,9 +77,7 @@ class RpcManager implements RpcManagerInterface
public function saveGrid(string $gameAssoc): bool
{
$existingGame = $this->entityManager
->getRepository(PlayedGame::class)
->findOneByGameAssoc($gameAssoc);
$existingGame = $this->playedGameRepository->findOneByGameAssoc($gameAssoc);
if (null !== $existingGame) {
return true;