Fix cs with new cs rules (php-cs-fixer version 3.35)

This commit is contained in:
2023-10-16 11:59:49 +02:00
parent 68d28f3e28
commit 51a4ffca2e
35 changed files with 53 additions and 53 deletions

View File

@@ -40,7 +40,7 @@ abstract class AddressPart extends FunctionNode
'country_id',
];
private \Doctrine\ORM\Query\AST\Node|string|null $date = null;
private null|\Doctrine\ORM\Query\AST\Node|string $date = null;
/**
* @var \Doctrine\ORM\Query\AST\Node

View File

@@ -977,7 +977,7 @@ class AccompanyingPeriod implements
/**
* @Groups({"read"})
*/
public function getRequestor(): Person|ThirdParty|null
public function getRequestor(): null|Person|ThirdParty
{
return $this->requestorPerson ?? $this->requestorThirdParty;
}

View File

@@ -96,7 +96,7 @@ class Resource
/**
* @Groups({"read"})
*/
public function getResource(): \Chill\PersonBundle\Entity\Person|\Chill\ThirdPartyBundle\Entity\ThirdParty|null
public function getResource(): null|\Chill\PersonBundle\Entity\Person|\Chill\ThirdPartyBundle\Entity\ThirdParty
{
return $this->person ?? $this->thirdParty;
}

View File

@@ -619,7 +619,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
* @return true | array True if the accompanying periods are not collapsing,
* an array with data for displaying the error
*/
public function checkAccompanyingPeriodsAreNotCollapsing(): bool|array
public function checkAccompanyingPeriodsAreNotCollapsing(): array|bool
{
$periods = $this->getAccompanyingPeriodsOrdered();
$periodsNbr = count($periods);

View File

@@ -156,7 +156,7 @@ class SocialAction
*
* @return Collection|SocialAction[] a list with the elements of the given list which are parent of other elements in the given list
*/
public static function findAncestorSocialActions(\Doctrine\Common\Collections\Collection|array $socialActions): Collection
public static function findAncestorSocialActions(array|\Doctrine\Common\Collections\Collection $socialActions): Collection
{
$ancestors = new ArrayCollection();
@@ -236,7 +236,7 @@ class SocialAction
/**
* @param Collection|SocialAction[] $socialActions
*/
public static function getDescendantsWithThisForActions(\Doctrine\Common\Collections\Collection|array $socialActions): Collection
public static function getDescendantsWithThisForActions(array|\Doctrine\Common\Collections\Collection $socialActions): Collection
{
$unique = [];
@@ -420,7 +420,7 @@ class SocialAction
return $this;
}
public static function filterRemoveDeactivatedActions(ReadableCollection|array $actions, \DateTime $comparisonDate): ReadableCollection|array
public static function filterRemoveDeactivatedActions(array|ReadableCollection $actions, \DateTime $comparisonDate): array|ReadableCollection
{
$filterFn = fn (SocialAction $socialAction) => !$socialAction->isDesactivated($comparisonDate);

View File

@@ -110,7 +110,7 @@ class SocialIssue
*
* @return Collection|SocialIssue[]
*/
public static function findAncestorSocialIssues(\Doctrine\Common\Collections\Collection|array $socialIssues): Collection
public static function findAncestorSocialIssues(array|\Doctrine\Common\Collections\Collection $socialIssues): Collection
{
$ancestors = new ArrayCollection();

View File

@@ -81,7 +81,7 @@ final readonly class JobWorkingOnCourseAggregator implements AggregatorInterface
public function getLabels($key, array $values, $data): \Closure
{
return function (int|string|null $jobId) {
return function (null|int|string $jobId) {
if (null === $jobId || '' === $jobId) {
return '';
}

View File

@@ -81,7 +81,7 @@ final readonly class ScopeWorkingOnCourseAggregator implements AggregatorInterfa
public function getLabels($key, array $values, $data): \Closure
{
return function (int|string|null $scopeId) {
return function (null|int|string $scopeId) {
if (null === $scopeId || '' === $scopeId) {
return '';
}

View File

@@ -41,7 +41,7 @@ final readonly class UserWorkingOnCourseAggregator implements AggregatorInterfac
public function getLabels($key, array $values, $data): \Closure
{
return function (int|string|null $userId) {
return function (null|int|string $userId) {
if (null === $userId || '' === $userId) {
return '';
}

View File

@@ -46,7 +46,7 @@ final readonly class CenterAggregator implements AggregatorInterface
public function getLabels($key, array $values, $data): Closure
{
return function (int|string|null $value) {
return function (null|int|string $value) {
if (null === $value || '' === $value) {
return '';
}

View File

@@ -37,7 +37,7 @@ class AccompanyingPeriodWorkNormalizer implements ContextAwareNormalizerInterfac
*
* @throws ExceptionInterface
*/
public function normalize($object, ?string $format = null, array $context = []): array|\ArrayObject|bool|float|int|string|null
public function normalize($object, ?string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string
{
$initial = $this->normalizer->normalize($object, $format, array_merge(
$context,

View File

@@ -518,7 +518,7 @@ class AccompanyingPeriodACLAwareRepositoryTest extends KernelTestCase
/**
* @param array<Scope> $scopes
*/
private function buildPeriod(Person $person, array $scopes, User|null $creator, bool $confirm): AccompanyingPeriod
private function buildPeriod(Person $person, array $scopes, null|User $creator, bool $confirm): AccompanyingPeriod
{
$period = new AccompanyingPeriod();
$period->addPerson($person);