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

@@ -18,14 +18,12 @@ use Chill\MainBundle\Repository\CenterRepositoryInterface;
use Chill\PersonBundle\Actions\Remove\PersonMove;
use Chill\PersonBundle\Actions\Remove\PersonMoveManager;
use Chill\PersonBundle\Entity\AccompanyingPeriod;
use Chill\PersonBundle\Entity\AccompanyingPeriodParticipation;
use Chill\PersonBundle\Entity\Household\Household;
use Chill\PersonBundle\Entity\Household\HouseholdMember;
use Chill\PersonBundle\Entity\Person;
use Chill\PersonBundle\Entity\Relationships\Relation;
use Chill\PersonBundle\Entity\Relationships\Relationship;
use Chill\PersonBundle\Repository\Person\PersonCenterHistoryInterface;
use Chill\PersonBundle\Repository\PersonRepository;
use Doctrine\DBAL\Connection;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
@@ -33,6 +31,7 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface;
/**
* @internal
*
* @coversNothing
*/
class PersonMoveTest extends KernelTestCase
@@ -85,13 +84,13 @@ class PersonMoveTest extends KernelTestCase
{
$move = new PersonMove($this->em, $this->personMoveManager, $this->eventDispatcher);
$sqls = $move->getSQL($personA, $personB);
$this->em->getConnection()->transactional(function (Connection $conn) use ($personA, $personB, $sqls) {
$this->em->getConnection()->transactional(function (Connection $conn) use ($sqls) {
foreach ($sqls as $sql) {
$conn->executeStatement($sql);
}
});
$personsByIdOfA = $this->em->createQuery("SELECT p FROM " . Person::class . " p WHERE p.id = :id")
$personsByIdOfA = $this->em->createQuery('SELECT p FROM '.Person::class.' p WHERE p.id = :id')
->setParameter('id', $personA->getId())
->getResult();
$personB = $this->em->find(Person::class, $personB->getId());
@@ -137,13 +136,13 @@ class PersonMoveTest extends KernelTestCase
$move = new PersonMove($this->em, $this->personMoveManager, $this->eventDispatcher);
$sqls = $move->getSQL($personA, $personB);
$this->em->getConnection()->transactional(function (Connection $conn) use ($personA, $personB, $sqls) {
$this->em->getConnection()->transactional(function (Connection $conn) use ($sqls) {
foreach ($sqls as $sql) {
$conn->executeStatement($sql);
}
});
$personsByIdOfA = $this->em->createQuery("SELECT p FROM " . Person::class . " p WHERE p.id = :id")
$personsByIdOfA = $this->em->createQuery('SELECT p FROM '.Person::class.' p WHERE p.id = :id')
->setParameter('id', $personA->getId())
->getResult();
/** @var Person $personB */
@@ -188,7 +187,7 @@ class PersonMoveTest extends KernelTestCase
self::$entitiesToDelete[] = [Person::class, $personA];
self::$entitiesToDelete[] = [Person::class, $personB];
yield [$personA, $personB, "move 2 people without any associated data"];
yield [$personA, $personB, 'move 2 people without any associated data'];
$personA = new Person();
$personB = new Person();
@@ -206,7 +205,7 @@ class PersonMoveTest extends KernelTestCase
self::$entitiesToDelete[] = [Person::class, $personB];
self::$entitiesToDelete[] = [Activity::class, $activity];
yield [$personA, $personB, "move 2 people having an activity"];
yield [$personA, $personB, 'move 2 people having an activity'];
$personA = new Person();
$personB = new Person();
@@ -232,7 +231,7 @@ class PersonMoveTest extends KernelTestCase
self::$entitiesToDelete[] = [Person::class, $personA];
self::$entitiesToDelete[] = [Person::class, $personB];
yield [$personA, $personB, "move 2 people having the same household at the same time"];
yield [$personA, $personB, 'move 2 people having the same household at the same time'];
$personA = new Person();
$personB = new Person();
@@ -249,13 +248,13 @@ class PersonMoveTest extends KernelTestCase
self::$entitiesToDelete[] = [Person::class, $personB];
self::$entitiesToDelete[] = [AccompanyingPeriod::class, $parcours];
yield [$personA, $personB, "move 2 people participating to the same parcours"];
yield [$personA, $personB, 'move 2 people participating to the same parcours'];
$personA = new Person();
$personB = new Person();
$relationship = new Relationship();
$relation = new Relation();
$user = (new User())->setUsername(uniqid())->setEmail(uniqid() . '@foo.com');
$user = (new User())->setUsername(uniqid())->setEmail(uniqid().'@foo.com');
$relationship->setRelation($relation);
$relationship->setToPerson($personA);
@@ -275,7 +274,7 @@ class PersonMoveTest extends KernelTestCase
self::$entitiesToDelete[] = [User::class, $user];
self::$entitiesToDelete[] = [Relationship::class, $relationship];
yield [$personA, $personB, "move 2 people with a relationship"];
yield [$personA, $personB, 'move 2 people with a relationship'];
$this->em->flush();
$this->em->clear();