cs: Second part - ignore test/app subdirectory.

This commit is contained in:
Pol Dellaiera
2021-11-23 14:34:34 +01:00
parent 5f37304796
commit 3ea35682eb
72 changed files with 326 additions and 365 deletions

View File

@@ -201,20 +201,20 @@ class CalendarType extends AbstractType
$builder->get('invites')
->addModelTransformer(new CallbackTransformer(
function (iterable $usersAsIterable): string {
$userIds = [];
$userIds = [];
foreach ($usersAsIterable as $value) {
$userIds[] = $value->getId();
}
foreach ($usersAsIterable as $value) {
$userIds[] = $value->getId();
}
return implode(',', $userIds);
},
return implode(',', $userIds);
},
function (?string $usersAsString): array {
return array_map(
fn (string $id): ?Invite => $this->om->getRepository(Invite::class)->findOneBy(['id' => (int) $id]),
explode(',', $usersAsString)
);
}
return array_map(
fn (string $id): ?Invite => $this->om->getRepository(Invite::class)->findOneBy(['id' => (int) $id]),
explode(',', $usersAsString)
);
}
));
}