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