mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-22 07:33:50 +00:00
DX: use array spred instead of array_merge
This commit is contained in:
@@ -116,20 +116,16 @@ class AccompanyingPeriodWorkEvaluationContext implements
|
||||
{
|
||||
$this->accompanyingPeriodWorkContext->buildPublicForm($builder, $template, $entity->getAccompanyingPeriodWork());
|
||||
|
||||
$thirdParties = array_merge(
|
||||
array_values(array_filter($entity->getAccompanyingPeriodWork()->getThirdParties()->toArray())),
|
||||
array_values(array_filter([$entity->getAccompanyingPeriodWork()->getHandlingThierParty()])),
|
||||
array_values(
|
||||
array_filter(
|
||||
array_map(
|
||||
fn (Resource $r): ?ThirdParty => $r->getThirdParty(),
|
||||
$entity->getAccompanyingPeriodWork()->getAccompanyingPeriod()->getResources()->filter(
|
||||
static fn (Resource $r): bool => null !== $r->getThirdParty()
|
||||
)->toArray()
|
||||
)
|
||||
$thirdParties = [...array_values(array_filter($entity->getAccompanyingPeriodWork()->getThirdParties()->toArray())), ...array_values(array_filter([$entity->getAccompanyingPeriodWork()->getHandlingThierParty()])), ...array_values(
|
||||
array_filter(
|
||||
array_map(
|
||||
fn (Resource $r): ?ThirdParty => $r->getThirdParty(),
|
||||
$entity->getAccompanyingPeriodWork()->getAccompanyingPeriod()->getResources()->filter(
|
||||
static fn (Resource $r): bool => null !== $r->getThirdParty()
|
||||
)->toArray()
|
||||
)
|
||||
)
|
||||
);
|
||||
)];
|
||||
|
||||
$options = $template->getOptions();
|
||||
if ($options['thirdParty'] ?? false) {
|
||||
|
Reference in New Issue
Block a user