mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-29 19:13:49 +00:00
apply more cs rules for php-cs
This commit is contained in:
@@ -14,9 +14,6 @@ namespace Chill\PersonBundle\DataFixtures\Helper;
|
||||
use Chill\PersonBundle\Entity\Person;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
use function array_pop;
|
||||
use function random_int;
|
||||
|
||||
trait PersonRandomHelper
|
||||
{
|
||||
private ?int $countPersons = null;
|
||||
@@ -41,11 +38,11 @@ trait PersonRandomHelper
|
||||
->select('p')
|
||||
->from(Person::class, 'p')
|
||||
->getQuery()
|
||||
->setFirstResult(random_int(0, $this->countPersons - $fetchBy))
|
||||
->setFirstResult(\random_int(0, $this->countPersons - $fetchBy))
|
||||
->setMaxResults($fetchBy)
|
||||
->getResult();
|
||||
}
|
||||
|
||||
return array_pop($this->randPersons);
|
||||
return \array_pop($this->randPersons);
|
||||
}
|
||||
}
|
||||
|
@@ -14,8 +14,6 @@ namespace Chill\PersonBundle\DataFixtures\Helper;
|
||||
use Chill\PersonBundle\Entity\Person;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
use function random_int;
|
||||
|
||||
trait RandomPersonHelperTrait
|
||||
{
|
||||
private ?int $nbOfPersons = null;
|
||||
@@ -36,7 +34,7 @@ trait RandomPersonHelperTrait
|
||||
return $qb
|
||||
->select('p')
|
||||
->setMaxResults(1)
|
||||
->setFirstResult(random_int(0, $this->nbOfPersons))
|
||||
->setFirstResult(\random_int(0, $this->nbOfPersons))
|
||||
->getQuery()
|
||||
->getSingleResult();
|
||||
}
|
||||
|
Reference in New Issue
Block a user