apply more cs rules for php-cs

This commit is contained in:
2023-10-17 13:27:03 +02:00
parent 0b0cbed9db
commit bc2041cbdd
1485 changed files with 8169 additions and 9620 deletions

View File

@@ -17,13 +17,8 @@ use Chill\PersonBundle\Entity\SocialWork\SocialAction;
use Chill\PersonBundle\Entity\SocialWork\SocialIssue;
use Chill\PersonBundle\Repository\AccompanyingPeriodRepository;
use Chill\PersonBundle\Repository\SocialWork\EvaluationRepository;
use DateTimeImmutable;
use Doctrine\Persistence\ObjectManager;
use function array_pop;
use function array_rand;
use function count;
class LoadAccompanyingPeriodWork extends \Doctrine\Bundle\FixturesBundle\Fixture implements \Doctrine\Common\DataFixtures\DependentFixtureInterface
{
/**
@@ -48,8 +43,8 @@ class LoadAccompanyingPeriodWork extends \Doctrine\Bundle\FixturesBundle\Fixture
$i = 0;
while (null !== $period = array_pop($periods)) {
/** @var AccompanyingPeriod $period */
while (null !== $period = \array_pop($periods)) {
/* @var AccompanyingPeriod $period */
++$i;
if (0 === $i % 15) {
@@ -66,11 +61,11 @@ class LoadAccompanyingPeriodWork extends \Doctrine\Bundle\FixturesBundle\Fixture
$work
->setAccompanyingPeriod($period)
->setSocialAction($action)
->setStartDate(new DateTimeImmutable('today'))
->setStartDate(new \DateTimeImmutable('today'))
->addPerson($period->getPersons()->first())
->setCreatedAt(new DateTimeImmutable())
->setCreatedAt(new \DateTimeImmutable())
->setCreatedBy($this->getReference('center a_social'))
->setUpdatedAt(new DateTimeImmutable())
->setUpdatedAt(new \DateTimeImmutable())
->setUpdatedBy($this->getReference('center a_social'));
$manager->persist($work);
@@ -93,11 +88,11 @@ class LoadAccompanyingPeriodWork extends \Doctrine\Bundle\FixturesBundle\Fixture
$work
->setAccompanyingPeriod($period)
->setSocialAction($action)
->setStartDate(new DateTimeImmutable('today'))
->setStartDate(new \DateTimeImmutable('today'))
->addPerson($period->getPersons()->first())
->setCreatedAt(new DateTimeImmutable())
->setCreatedAt(new \DateTimeImmutable())
->setCreatedBy($this->getReference('center a_social'))
->setUpdatedAt(new DateTimeImmutable())
->setUpdatedAt(new \DateTimeImmutable())
->setUpdatedBy($this->getReference('center a_social'));
$manager->persist($work);
$ev = new AccompanyingPeriod\AccompanyingPeriodWorkEvaluation();
@@ -114,20 +109,20 @@ class LoadAccompanyingPeriodWork extends \Doctrine\Bundle\FixturesBundle\Fixture
{
$actions = $socialIssue->getRecursiveSocialActions()->toArray();
if (0 === count($actions)) {
if (0 === \count($actions)) {
return null;
}
return $actions[array_rand($actions)];
return $actions[\array_rand($actions)];
}
private function getRandomEvaluation(): Evaluation
{
if (0 === count($this->cacheEvaluations)) {
if (0 === \count($this->cacheEvaluations)) {
$this->cacheEvaluations = $this->evaluationRepository
->findAll();
}
return $this->cacheEvaluations[array_rand($this->cacheEvaluations)];
return $this->cacheEvaluations[\array_rand($this->cacheEvaluations)];
}
}