calendar: cast collection to array

This commit is contained in:
nobohan 2021-11-24 15:11:46 +01:00
parent d13d42b9bf
commit 220f297391

View File

@ -332,12 +332,12 @@ class CalendarController extends AbstractController
$personsId = array_map( $personsId = array_map(
static fn (Person $p): int => $p->getId(), static fn (Person $p): int => $p->getId(),
$entity->getPersons() $entity->getPersons()->toArray()
); );
$professionalsId = array_map( $professionalsId = array_map(
static fn (ThirdParty $thirdParty): ?int => $thirdParty->getId(), static fn (ThirdParty $thirdParty): ?int => $thirdParty->getId(),
$entity->getProfessionals() $entity->getProfessionals()->toArray()
); );
$durationTime = $entity->getEndDate()->diff($entity->getStartDate()); $durationTime = $entity->getEndDate()->diff($entity->getStartDate());