mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-05 14:25:00 +00:00
upgrade php-cs 3.49
This commit is contained in:
@@ -91,7 +91,7 @@ class JobWithReturn implements CronJobInterface
|
||||
return 'with-data';
|
||||
}
|
||||
|
||||
public function run(array $lastExecutionData): null|array
|
||||
public function run(array $lastExecutionData): array|null
|
||||
{
|
||||
return ['data' => 'test'];
|
||||
}
|
||||
|
@@ -175,7 +175,7 @@ class JobCanRun implements CronJobInterface
|
||||
return $this->key;
|
||||
}
|
||||
|
||||
public function run(array $lastExecutionData): null|array
|
||||
public function run(array $lastExecutionData): array|null
|
||||
{
|
||||
return null;
|
||||
}
|
||||
@@ -193,7 +193,7 @@ class JobCannotRun implements CronJobInterface
|
||||
return 'job-b';
|
||||
}
|
||||
|
||||
public function run(array $lastExecutionData): null|array
|
||||
public function run(array $lastExecutionData): array|null
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
@@ -498,11 +498,11 @@ final class ExportManagerTest extends KernelTestCase
|
||||
* user 'center a_social' from database.
|
||||
*/
|
||||
protected function createExportManager(
|
||||
LoggerInterface $logger = null,
|
||||
EntityManagerInterface $em = null,
|
||||
AuthorizationCheckerInterface $authorizationChecker = null,
|
||||
AuthorizationHelper $authorizationHelper = null,
|
||||
UserInterface $user = null,
|
||||
?LoggerInterface $logger = null,
|
||||
?EntityManagerInterface $em = null,
|
||||
?AuthorizationCheckerInterface $authorizationChecker = null,
|
||||
?AuthorizationHelper $authorizationHelper = null,
|
||||
?UserInterface $user = null,
|
||||
array $exports = [],
|
||||
array $aggregators = [],
|
||||
array $filters = [],
|
||||
|
@@ -102,7 +102,7 @@ class SortExportElementTest extends KernelTestCase
|
||||
private function makeTranslator(): TranslatorInterface
|
||||
{
|
||||
return new class () implements TranslatorInterface {
|
||||
public function trans(string $id, array $parameters = [], string $domain = null, string $locale = null)
|
||||
public function trans(string $id, array $parameters = [], ?string $domain = null, ?string $locale = null)
|
||||
{
|
||||
return $id;
|
||||
}
|
||||
|
@@ -113,7 +113,7 @@ class NotificationMailerTest extends TestCase
|
||||
}
|
||||
|
||||
private function buildNotificationMailer(
|
||||
MailerInterface $mailer = null,
|
||||
?MailerInterface $mailer = null,
|
||||
): NotificationMailer {
|
||||
return new NotificationMailer(
|
||||
$mailer,
|
||||
|
@@ -84,7 +84,7 @@ final class DateNormalizerTest extends KernelTestCase
|
||||
$this->assertFalse($this->buildDateNormalizer()->supportsNormalization(new \DateTime(), 'xml'));
|
||||
}
|
||||
|
||||
private function buildDateNormalizer(string $locale = null): DateNormalizer
|
||||
private function buildDateNormalizer(?string $locale = null): DateNormalizer
|
||||
{
|
||||
$requestStack = $this->prophet->prophesize(RequestStack::class);
|
||||
$parameterBag = new ParameterBag();
|
||||
|
@@ -117,19 +117,19 @@ final class UserNormalizerTest extends TestCase
|
||||
*
|
||||
* @throws ExceptionInterface
|
||||
*/
|
||||
public function testNormalize(null|User $user, mixed $format, mixed $context, mixed $expected)
|
||||
public function testNormalize(User|null $user, mixed $format, mixed $context, mixed $expected)
|
||||
{
|
||||
$userRender = $this->prophesize(UserRender::class);
|
||||
$userRender->renderString(Argument::type(User::class), Argument::type('array'))->willReturn($user ? $user->getLabel() : '');
|
||||
|
||||
$normalizer = new UserNormalizer($userRender->reveal());
|
||||
$normalizer->setNormalizer(new class () implements NormalizerInterface {
|
||||
public function normalize($object, string $format = null, array $context = [])
|
||||
public function normalize($object, ?string $format = null, array $context = [])
|
||||
{
|
||||
return ['context' => $context['docgen:expects'] ?? null];
|
||||
}
|
||||
|
||||
public function supportsNormalization($data, string $format = null)
|
||||
public function supportsNormalization($data, ?string $format = null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user