From 459b91001f642d12bb62bb8e71374b8a7d7b5889 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Sat, 15 Apr 2023 00:08:04 +0200 Subject: [PATCH] fix rector issues --- .../Controller/AddressToReferenceMatcherControllerTest.php | 4 ++-- .../Controller/GeographicalUnitByAddressApiControllerTest.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Tests/Controller/AddressToReferenceMatcherControllerTest.php b/src/Bundle/ChillMainBundle/Tests/Controller/AddressToReferenceMatcherControllerTest.php index 7bcbe9889..4a65883e2 100644 --- a/src/Bundle/ChillMainBundle/Tests/Controller/AddressToReferenceMatcherControllerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Controller/AddressToReferenceMatcherControllerTest.php @@ -84,7 +84,7 @@ class AddressToReferenceMatcherControllerTest extends WebTestCase /** @var Address $address */ $address = $em->createQuery('SELECT a FROM '.Address::class.' a') - ->setFirstResult(rand(0, $nb)) + ->setFirstResult(random_int(0, $nb)) ->setMaxResults(1) ->getSingleResult(); @@ -108,7 +108,7 @@ class AddressToReferenceMatcherControllerTest extends WebTestCase $ref = $em->createQuery('SELECT a FROM '.AddressReference::class.' a') ->setMaxResults(1) - ->setFirstResult(rand(0, $nb)) + ->setFirstResult(random_int(0, $nb)) ->getSingleResult(); $address = Address::createFromAddressReference($ref); diff --git a/src/Bundle/ChillMainBundle/Tests/Controller/GeographicalUnitByAddressApiControllerTest.php b/src/Bundle/ChillMainBundle/Tests/Controller/GeographicalUnitByAddressApiControllerTest.php index a320bb073..60273a8c9 100644 --- a/src/Bundle/ChillMainBundle/Tests/Controller/GeographicalUnitByAddressApiControllerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Controller/GeographicalUnitByAddressApiControllerTest.php @@ -44,7 +44,7 @@ class GeographicalUnitByAddressApiControllerTest extends WebTestCase $nb = $em->createQuery('SELECT COUNT(a) FROM '.Address::class.' a')->getSingleScalarResult(); /** @var \Chill\MainBundle\Entity\Address $random */ $random = $em->createQuery('SELECT a FROM '.Address::class.' a') - ->setFirstResult(rand(0, $nb)) + ->setFirstResult(random_int(0, $nb)) ->setMaxResults(1) ->getSingleResult();