agregar pabellon a tabla de equipos, mejorar respuesta de registro de usuario, normalizar mensajes de error
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user