agregar pabellon a tabla de equipos, mejorar respuesta de registro de usuario, normalizar mensajes de error

This commit is contained in:
Daniel Guzman
2024-05-23 00:22:06 +02:00
parent 557b586b76
commit 82282ebbca
387 changed files with 889 additions and 606 deletions
+30
View File
@@ -0,0 +1,30 @@
<?php
namespace DMD\LaLigaApi\Service\League;
use DMD\LaLigaApi\Dto\FacilityDto;
use DMD\LaLigaApi\Dto\LeagueDto;
use DMD\LaLigaApi\Entity\Facility;
use DMD\LaLigaApi\Entity\League;
class FacilityFactory
{
public static function create(FacilityDto $facilityDto): Facility
{
$facilityEntity = new Facility();
if (!empty($facilityDto->name))
{
$facilityEntity->setName($facilityDto->name);
}
if (!empty($facilityDto->address))
{
$facilityEntity->setName($facilityDto->address);
}
if (!empty($facilityDto->address))
{
$facilityEntity->setName($facilityDto->address);
}
$facilityEntity->setActive(true);
return $facilityEntity;
}
}