mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-05 14:25:00 +00:00
Fix phpstan issues
This commit is contained in:
@@ -113,7 +113,7 @@ class Generator implements GeneratorInterface
|
||||
throw new GeneratorException($e->getErrors(), $e);
|
||||
}
|
||||
|
||||
if ($isTest) {
|
||||
if (true === $isTest) {
|
||||
$this->logger->info(self::LOG_PREFIX.'Finished generation of a document', [
|
||||
'is_test' => true,
|
||||
'entity_id' => $entityId,
|
||||
@@ -122,7 +122,7 @@ class Generator implements GeneratorInterface
|
||||
return $generatedResource;
|
||||
}
|
||||
|
||||
/** @var StoredObject $storedObject */
|
||||
/** @var StoredObject $destinationStoredObject */
|
||||
$destinationStoredObject
|
||||
->setType($template->getFile()->getType())
|
||||
->setFilename(sprintf('%s_odt', uniqid('doc_', true)))
|
||||
|
@@ -4,7 +4,7 @@ namespace Chill\DocGeneratorBundle\Service\Generator;
|
||||
|
||||
class RelatedEntityNotFoundException extends \RuntimeException
|
||||
{
|
||||
public function __construct(string $relatedEntityClass, int $relatedEntityId, Throwable $previous = null)
|
||||
public function __construct(string $relatedEntityClass, int $relatedEntityId, \Throwable $previous = null)
|
||||
{
|
||||
parent::__construct(
|
||||
sprintf("Related entity not found: %s, %s", $relatedEntityClass, $relatedEntityId),
|
||||
|
@@ -108,10 +108,7 @@ final class OnGenerationFails implements EventSubscriberInterface
|
||||
|
||||
private function warnCreator(RequestGenerationMessage $message, WorkerMessageFailedEvent $event): void
|
||||
{
|
||||
if (null === $creatorId = $message->getCreatorId()) {
|
||||
$this->logger->info(self::LOG_PREFIX.'creator id is null');
|
||||
return;
|
||||
}
|
||||
$creatorId = $message->getCreatorId();
|
||||
|
||||
if (null === $creator = $this->userRepository->find($creatorId)) {
|
||||
$this->logger->error(self::LOG_PREFIX.'Creator not found with given id', ['creator_id', $creatorId]);
|
||||
|
Reference in New Issue
Block a user