refactor: move WikidataAwardGateway to src/Gateway/WikidataGateway.php

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
thibaud-leclere
2026-03-31 11:14:20 +02:00
parent ecfc80c349
commit 6cbebb6367
2 changed files with 5 additions and 4 deletions

View File

@@ -2,12 +2,12 @@
declare(strict_types=1);
namespace App\Service;
namespace App\Gateway;
use App\Entity\Actor;
use Symfony\Contracts\HttpClient\HttpClientInterface;
class WikidataAwardGateway
class WikidataGateway
{
private const SPARQL_ENDPOINT = 'https://query.wikidata.org/sparql';

View File

@@ -11,6 +11,7 @@ use App\Entity\User;
use App\Repository\ActorRepository;
use App\Repository\MovieRepository;
use App\Repository\MovieRoleRepository;
use App\Gateway\WikidataGateway;
use Doctrine\ORM\EntityManagerInterface;
class GameGridGenerator
@@ -19,7 +20,7 @@ class GameGridGenerator
private readonly ActorRepository $actorRepository,
private readonly MovieRoleRepository $movieRoleRepository,
private readonly MovieRepository $movieRepository,
private readonly WikidataAwardGateway $wikidataAwardGateway,
private readonly WikidataGateway $wikidataGateway,
private readonly EntityManagerInterface $em,
) {}
@@ -173,7 +174,7 @@ class GameGridGenerator
case 'award':
try {
$awards = $this->wikidataAwardGateway->getAwards($rowActor);
$awards = $this->wikidataGateway->getAwards($rowActor);
} catch (\Throwable) {
return null;
}