Fix phpstan issues

This commit is contained in:
2023-02-28 21:43:28 +01:00
parent 7dc07129f8
commit 318599334e
21 changed files with 81 additions and 208 deletions

View File

@@ -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)))

View File

@@ -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),