DX: apply rector rulesset up to PHP72

This commit is contained in:
2023-03-29 22:32:52 +02:00
parent 64b8ae3df1
commit b9a7530f7a
110 changed files with 194 additions and 229 deletions

View File

@@ -162,7 +162,7 @@ final class PersonMoveEventSubscriberTest extends KernelTestCase
->setNextMembership($nextMembership);
$notificationPersister = $this->prophesize(NotificationPersisterInterface::class);
$notificationPersister->persist(Argument::type(Notification::class))->shouldBeCalled(1);
$notificationPersister->persist(Argument::type(Notification::class))->shouldBeCalled();
$eventSubscriber = $this->buildSubscriber(null, $notificationPersister->reveal(), null, null);
$eventSubscriber->resetPeriodLocation($event);

View File

@@ -89,7 +89,7 @@ final class PersonControllerCreateTest extends WebTestCase
$form = $crawler->selectButton('Ajouter la personne')->form();
$this->assertInstanceOf(
'Symfony\Component\DomCrawler\Form',
\Symfony\Component\DomCrawler\Form::class,
$form,
'The page contains a butto '
);

View File

@@ -158,7 +158,7 @@ final class PersonVoterTest extends KernelTestCase
{
$token = $this->prophet->prophesize();
$token
->willImplement('\Symfony\Component\Security\Core\Authentication\Token\TokenInterface');
->willImplement('\\' . \Symfony\Component\Security\Core\Authentication\Token\TokenInterface::class);
if (null === $permissions) {
$token->getUser()->willReturn(null);

View File

@@ -88,7 +88,7 @@ final class AccompanyingPeriodWorkDocGenNormalizerTest extends KernelTestCase
$this->assertEqualsCanonicalizing(array_keys($expected), array_keys($actual));
foreach ($expected as $key => $item) {
if ('@ignored' === $item) {
if (0 === $item) {
continue;
}

View File

@@ -187,8 +187,7 @@ final class PersonContextTest extends TestCase
{
$builder = $this->prophesize(FormBuilderInterface::class);
$builder->add('title', TextType::class, Argument::type('array'))
->shouldBeCalled(1);
$builder->add('title', TextType::class, Argument::type('array'))->shouldBeCalled();
if ($withScope) {
$builder->add('scope', ScopePickerType::class, Argument::type('array'))