mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
DX: fix cs
This commit is contained in:
@@ -114,8 +114,8 @@ final class CalendarTypeTest extends TypeTestCase
|
||||
$this->assertEquals(8, $calendar->getCalendarRange()->getId());
|
||||
$this->assertEquals(9, $calendar->getLocation()->getId());
|
||||
$this->assertEquals(true, $calendar->getSendSMS());
|
||||
$this->assertContains(2, $calendar->getUsers()->map(static fn(User $u) => $u->getId()));
|
||||
$this->assertContains(3, $calendar->getUsers()->map(static fn(User $u) => $u->getId()));
|
||||
$this->assertContains(2, $calendar->getUsers()->map(static fn (User $u) => $u->getId()));
|
||||
$this->assertContains(3, $calendar->getUsers()->map(static fn (User $u) => $u->getId()));
|
||||
}
|
||||
|
||||
protected function getExtensions()
|
||||
@@ -144,16 +144,16 @@ final class CalendarTypeTest extends TypeTestCase
|
||||
) {
|
||||
$transformer = $this->prophesize($classTransformer);
|
||||
$transformer->transform(Argument::type('array'))
|
||||
->will(static fn($args) => implode(
|
||||
->will(static fn ($args) => implode(
|
||||
',',
|
||||
array_map(static fn($p) => $p->getId(), $args[0])
|
||||
array_map(static fn ($p) => $p->getId(), $args[0])
|
||||
));
|
||||
$transformer->transform(Argument::exact(null))
|
||||
->willReturn([]);
|
||||
$transformer->transform(Argument::type(Collection::class))
|
||||
->will(static fn($args) => implode(
|
||||
->will(static fn ($args) => implode(
|
||||
',',
|
||||
array_map(static fn($p) => $p->getId(), $args[0]->toArray())
|
||||
array_map(static fn ($p) => $p->getId(), $args[0]->toArray())
|
||||
));
|
||||
$transformer->reverseTransform(Argument::type('string'))
|
||||
->will(static function ($args) use ($objClass) {
|
||||
@@ -183,7 +183,7 @@ final class CalendarTypeTest extends TypeTestCase
|
||||
) {
|
||||
$transformer = $this->prophesize($classTransformer);
|
||||
$transformer->transform(Argument::type('object'))
|
||||
->will(static fn($args) => (string) $args[0]->getId());
|
||||
->will(static fn ($args) => (string) $args[0]->getId());
|
||||
$transformer->transform(Argument::exact(null))
|
||||
->willReturn('');
|
||||
$transformer->reverseTransform(Argument::type('string'))
|
||||
|
@@ -63,7 +63,7 @@ final class AddressConverterTest extends TestCase
|
||||
{
|
||||
$engine = $this->prophesize(EngineInterface::class);
|
||||
$translatableStringHelper = $this->prophesize(TranslatableStringHelperInterface::class);
|
||||
$translatableStringHelper->localize(Argument::type('array'))->will(static fn($args): string => ($args[0] ?? ['fr' => 'not provided'])['fr'] ?? 'not provided');
|
||||
$translatableStringHelper->localize(Argument::type('array'))->will(static fn ($args): string => ($args[0] ?? ['fr' => 'not provided'])['fr'] ?? 'not provided');
|
||||
|
||||
$addressRender = new AddressRender($engine->reveal(), $translatableStringHelper->reveal());
|
||||
|
||||
|
@@ -72,13 +72,13 @@ final class CalendarForShortMessageProviderTest extends TestCase
|
||||
Argument::type(DateTimeImmutable::class),
|
||||
Argument::type('int'),
|
||||
Argument::exact(0)
|
||||
)->will(static fn($args) => array_fill(0, $args[2], new Calendar()))->shouldBeCalledTimes(1);
|
||||
)->will(static fn ($args) => array_fill(0, $args[2], new Calendar()))->shouldBeCalledTimes(1);
|
||||
$calendarRepository->findByNotificationAvailable(
|
||||
Argument::type(DateTimeImmutable::class),
|
||||
Argument::type(DateTimeImmutable::class),
|
||||
Argument::type('int'),
|
||||
Argument::not(0)
|
||||
)->will(static fn($args) => array_fill(0, $args[2] - 1, new Calendar()))->shouldBeCalledTimes(1);
|
||||
)->will(static fn ($args) => array_fill(0, $args[2] - 1, new Calendar()))->shouldBeCalledTimes(1);
|
||||
|
||||
$em = $this->prophesize(EntityManagerInterface::class);
|
||||
$em->clear()->shouldBeCalled();
|
||||
@@ -104,13 +104,13 @@ final class CalendarForShortMessageProviderTest extends TestCase
|
||||
Argument::type(DateTimeImmutable::class),
|
||||
Argument::type('int'),
|
||||
Argument::exact(0)
|
||||
)->will(static fn($args) => array_fill(0, 1, new Calendar()))->shouldBeCalledTimes(1);
|
||||
)->will(static fn ($args) => array_fill(0, 1, new Calendar()))->shouldBeCalledTimes(1);
|
||||
$calendarRepository->findByNotificationAvailable(
|
||||
Argument::type(DateTimeImmutable::class),
|
||||
Argument::type(DateTimeImmutable::class),
|
||||
Argument::type('int'),
|
||||
Argument::not(0)
|
||||
)->will(static fn($args) => [])->shouldBeCalledTimes(1);
|
||||
)->will(static fn ($args) => [])->shouldBeCalledTimes(1);
|
||||
|
||||
$em = $this->prophesize(EntityManagerInterface::class);
|
||||
$em->clear()->shouldBeCalled();
|
||||
|
Reference in New Issue
Block a user