mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-07-03 07:26:12 +00:00
Apply some rector transformations
This commit is contained in:
parent
2a65398277
commit
f1ff507d0a
@ -20,7 +20,7 @@ use Symfony\Component\Messenger\Exception\UnrecoverableMessageHandlingException;
|
||||
use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
|
||||
|
||||
#[AsMessageHandler]
|
||||
class RemoveExportGenerationMessageHandler implements MessageHandlerInterface
|
||||
final readonly class RemoveExportGenerationMessageHandler implements MessageHandlerInterface
|
||||
{
|
||||
private const LOG_PREFIX = '[RemoveExportGenerationMessageHandler] ';
|
||||
|
||||
|
@ -93,11 +93,10 @@ class RemoveExpiredExportGenerationCronJobTest extends TestCase
|
||||
new ExportGeneration('dummy', []),
|
||||
];
|
||||
|
||||
$repo->findExpiredExportGeneration(Argument::that(function ($dateTime) use ($clock) {
|
||||
$repo->findExpiredExportGeneration(Argument::that(fn($dateTime) =>
|
||||
// Ensure the repository is called with the current clock time
|
||||
return $dateTime instanceof \DateTimeImmutable
|
||||
&& $dateTime->getTimestamp() === $clock->now()->getTimestamp();
|
||||
}))->willReturn($expiredExports);
|
||||
$dateTime instanceof \DateTimeImmutable
|
||||
&& $dateTime->getTimestamp() === $clock->now()->getTimestamp()))->willReturn($expiredExports);
|
||||
|
||||
// Expect one RemoveExportGenerationMessage for each expired export
|
||||
$bus->dispatch(Argument::that(fn (Envelope $envelope) => $envelope->getMessage() instanceof RemoveExportGenerationMessage))
|
||||
|
@ -37,15 +37,13 @@ class PickSocialActionType extends AbstractType
|
||||
'show_social_issue_parenthesis' => false,
|
||||
'show_deactivated' => false,
|
||||
])
|
||||
->setNormalizer('choice_label', function (Options $options, $value) {
|
||||
return fn (SocialAction $sa) => $this->actionRender->renderString(
|
||||
$sa,
|
||||
[
|
||||
SocialActionRender::SHOW_SOCIAL_ISSUE => $options['show_social_issue_parenthesis'],
|
||||
SocialActionRender::SHOW_DEACTIVATED => $options['show_deactivated'],
|
||||
]
|
||||
);
|
||||
})
|
||||
->setNormalizer('choice_label', fn(Options $options, $value) => fn (SocialAction $sa) => $this->actionRender->renderString(
|
||||
$sa,
|
||||
[
|
||||
SocialActionRender::SHOW_SOCIAL_ISSUE => $options['show_social_issue_parenthesis'],
|
||||
SocialActionRender::SHOW_DEACTIVATED => $options['show_deactivated'],
|
||||
]
|
||||
))
|
||||
->setAllowedTypes('multiple', ['bool'])
|
||||
->setAllowedTypes('show_social_issue_parenthesis', ['bool']);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user