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

@@ -20,6 +20,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
/**
* @internal
*
* @coversNothing
*/
final class AccompanyingPeriodDocGenNormalizerTest extends KernelTestCase

View File

@@ -17,6 +17,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
/**
* @internal
*
* @coversNothing
*/
final class AccompanyingPeriodOriginNormalizerTest extends KernelTestCase

View File

@@ -18,6 +18,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
/**
* @internal
*
* @coversNothing
*/
final class AccompanyingPeriodResourceNormalizerTest extends KernelTestCase

View File

@@ -17,13 +17,13 @@ use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkGoal;
use Chill\PersonBundle\Entity\Person;
use Chill\PersonBundle\Entity\SocialWork\Goal;
use Chill\PersonBundle\Entity\SocialWork\Result;
use DateTimeImmutable;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
use Symfony\Component\Serializer\Normalizer\AbstractNormalizer;
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
/**
* @internal
*
* @coversNothing
*/
final class AccompanyingPeriodWorkDocGenNormalizerTest extends KernelTestCase
@@ -67,8 +67,8 @@ final class AccompanyingPeriodWorkDocGenNormalizerTest extends KernelTestCase
->addPerson((new Person())->setFirstName('hello')->setLastName('name'))
->addGoal($g = new AccompanyingPeriodWorkGoal())
->addResult($r = new Result())
->setCreatedAt(new DateTimeImmutable())
->setUpdatedAt(new DateTimeImmutable())
->setCreatedAt(new \DateTimeImmutable())
->setUpdatedAt(new \DateTimeImmutable())
->setCreatedBy($user = new User())
->setUpdatedBy($user);
$g->addResult($r)->setGoal($goal = new Goal());

View File

@@ -16,11 +16,11 @@ use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkEvaluatio
use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkEvaluationDocument;
use Chill\PersonBundle\Serializer\Normalizer\AccompanyingPeriodWorkEvaluationDenormalizer;
use PHPUnit\Framework\TestCase;
use ReflectionProperty;
use Symfony\Component\Serializer\Normalizer\AbstractNormalizer;
/**
* @internal
*
* @coversNothing
*/
final class AccompanyingPeriodWorkEvaluationDenormalizerTest extends TestCase
@@ -102,7 +102,7 @@ final class AccompanyingPeriodWorkEvaluationDenormalizerTest extends TestCase
$evaluation = new AccompanyingPeriodWorkEvaluation();
$doc = new AccompanyingPeriodWorkEvaluationDocument();
$doc->setStoredObject($storedObject = new StoredObject());
$reflectionProperty = new ReflectionProperty(AccompanyingPeriodWorkEvaluationDocument::class, 'id');
$reflectionProperty = new \ReflectionProperty(AccompanyingPeriodWorkEvaluationDocument::class, 'id');
$reflectionProperty->setAccessible(true);
$reflectionProperty->setValue($doc, 1);

View File

@@ -15,7 +15,6 @@ use Chill\PersonBundle\Entity\Household\Household;
use Chill\PersonBundle\Entity\Household\HouseholdMember;
use Chill\PersonBundle\Entity\Household\Position;
use Chill\PersonBundle\Entity\Person;
use DateTimeImmutable;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
use Symfony\Component\Serializer\Normalizer\AbstractNormalizer;
@@ -23,6 +22,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
/**
* @internal
*
* @coversNothing
*/
final class HouseholdNormalizerTest extends KernelTestCase
@@ -52,8 +52,8 @@ final class HouseholdNormalizerTest extends KernelTestCase
->setAllowHolder(true);
$member->setPerson($person)
->setStartDate(new DateTimeImmutable('1 year ago'))
->setEndDate(new DateTimeImmutable('1 month ago'))
->setStartDate(new \DateTimeImmutable('1 year ago'))
->setEndDate(new \DateTimeImmutable('1 month ago'))
->setPosition($position);
$household->addMember($member);
@@ -87,8 +87,8 @@ final class HouseholdNormalizerTest extends KernelTestCase
->setAllowHolder(true);
$member->setPerson($previousPerson)
->setStartDate(new DateTimeImmutable('1 year ago'))
->setEndDate(new DateTimeImmutable('1 month ago'))
->setStartDate(new \DateTimeImmutable('1 year ago'))
->setEndDate(new \DateTimeImmutable('1 month ago'))
->setPosition($position);
$household->addMember($member);
@@ -98,7 +98,7 @@ final class HouseholdNormalizerTest extends KernelTestCase
$this->entityManager->persist($currentPerson1);
$member = new HouseholdMember();
$member->setPerson($currentPerson1)
->setStartDate(new DateTimeImmutable('1 year ago'))
->setStartDate(new \DateTimeImmutable('1 year ago'))
->setPosition($position);
$household->addMember($member);

View File

@@ -28,10 +28,10 @@ use Prophecy\PhpUnit\ProphecyTrait;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
use function array_merge;
/**
* @internal
*
* @coversNothing
*/
final class PersonDocGenNormalizerTest extends KernelTestCase
@@ -237,12 +237,12 @@ final class PersonDocGenNormalizerTest extends KernelTestCase
}
private function buildNormalizer(
?PersonRender $personRender = null,
?RelationshipRepository $relationshipRepository = null,
?TranslatorInterface $translator = null,
?TranslatableStringHelper $translatableStringHelper = null,
?NormalizerInterface $normalizer = null,
?SummaryBudgetInterface $summaryBudget = null
PersonRender $personRender = null,
RelationshipRepository $relationshipRepository = null,
TranslatorInterface $translator = null,
TranslatableStringHelper $translatableStringHelper = null,
NormalizerInterface $normalizer = null,
SummaryBudgetInterface $summaryBudget = null
): PersonDocGenNormalizer {
if (null === $summaryBudget) {
$summaryBudget = $this->prophesize(SummaryBudgetInterface::class);
@@ -274,11 +274,11 @@ final class PersonDocGenNormalizerTest extends KernelTestCase
}
private function buildPersonNormalizer(
?PersonRender $personRender = null,
?RelationshipRepository $relationshipRepository = null,
?TranslatorInterface $translator = null,
?TranslatableStringHelper $translatableStringHelper = null,
?SummaryBudgetInterface $summaryBudget = null
PersonRender $personRender = null,
RelationshipRepository $relationshipRepository = null,
TranslatorInterface $translator = null,
TranslatableStringHelper $translatableStringHelper = null,
SummaryBudgetInterface $summaryBudget = null
): PersonDocGenNormalizer {
if (null === $relationshipRepository) {
$relationshipRepository = $this->prophesize(RelationshipRepository::class);

View File

@@ -26,6 +26,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
/**
* @internal
*
* @coversNothing
*/
final class PersonJsonNormalizerTest extends KernelTestCase

View File

@@ -20,10 +20,10 @@ use PHPUnit\Framework\TestCase;
use Prophecy\Argument;
use Prophecy\PhpUnit\ProphecyTrait;
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
use function is_object;
/**
* @internal
*
* @coversNothing
*/
final class RelationshipDocGenNormalizerTest extends TestCase
@@ -145,7 +145,7 @@ final class RelationshipDocGenNormalizerTest extends TestCase
return $r;
}
if (is_object($args[0])) {
if (\is_object($args[0])) {
return ['fake' => true, 'hash' => null !== $args[0] ? spl_object_hash($args[0]) : null];
}

View File

@@ -18,6 +18,7 @@ use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
/**
* @internal
*
* @coversNothing
*/
final class ResourceJsonNormalizerTest extends KernelTestCase

View File

@@ -17,6 +17,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
/**
* @internal
*
* @coversNothing
*/
final class SocialActionNormalizerTest extends KernelTestCase

View File

@@ -17,6 +17,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
/**
* @internal
*
* @coversNothing
*/
final class SocialIssueNormalizerTest extends KernelTestCase