mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-29 19:13:49 +00:00
apply more cs rules for php-cs
This commit is contained in:
@@ -30,11 +30,10 @@ final readonly class OnGenerationFails implements EventSubscriberInterface
|
||||
|
||||
public function __construct(private DocGeneratorTemplateRepository $docGeneratorTemplateRepository, private EntityManagerInterface $entityManager, private LoggerInterface $logger, private MailerInterface $mailer, private StoredObjectRepository $storedObjectRepository, private TranslatorInterface $translator, private UserRepositoryInterface $userRepository) {}
|
||||
|
||||
|
||||
public static function getSubscribedEvents()
|
||||
{
|
||||
return [
|
||||
WorkerMessageFailedEvent::class => 'onMessageFailed'
|
||||
WorkerMessageFailedEvent::class => 'onMessageFailed',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -82,11 +81,13 @@ final readonly class OnGenerationFails implements EventSubscriberInterface
|
||||
|
||||
if (null === $creator = $this->userRepository->find($creatorId)) {
|
||||
$this->logger->error(self::LOG_PREFIX.'Creator not found with given id', ['creator_id', $creatorId]);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (null === $creator->getEmail() || '' === $creator->getEmail()) {
|
||||
$this->logger->info(self::LOG_PREFIX.'Creator does not have any email', ['user' => $creator->getUsernameCanonical()]);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -104,6 +105,7 @@ final readonly class OnGenerationFails implements EventSubscriberInterface
|
||||
|
||||
if (null === $template = $this->docGeneratorTemplateRepository->find($message->getTemplateId())) {
|
||||
$this->logger->info(self::LOG_PREFIX.'Template not found', ['template_id' => $message->getTemplateId()]);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user