mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-05 14:25:00 +00:00
apply rules rector up to php82
This commit is contained in:
@@ -19,7 +19,7 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
|
||||
|
||||
class BaseContextData
|
||||
{
|
||||
public function __construct(private NormalizerInterface $normalizer)
|
||||
public function __construct(private readonly NormalizerInterface $normalizer)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -27,7 +27,7 @@ class Generator implements GeneratorInterface
|
||||
{
|
||||
private const LOG_PREFIX = '[docgen generator] ';
|
||||
|
||||
public function __construct(private ContextManagerInterface $contextManager, private DriverInterface $driver, private EntityManagerInterface $entityManager, private LoggerInterface $logger, private StoredObjectManagerInterface $storedObjectManager)
|
||||
public function __construct(private readonly ContextManagerInterface $contextManager, private readonly DriverInterface $driver, private readonly EntityManagerInterface $entityManager, private readonly LoggerInterface $logger, private readonly StoredObjectManagerInterface $storedObjectManager)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -19,7 +19,7 @@ class GeneratorException extends RuntimeException
|
||||
/**
|
||||
* @param string[] $errors
|
||||
*/
|
||||
public function __construct(private array $errors = [], ?Throwable $previous = null)
|
||||
public function __construct(private readonly array $errors = [], ?Throwable $previous = null)
|
||||
{
|
||||
parent::__construct(
|
||||
'Could not generate the document',
|
||||
|
@@ -24,7 +24,7 @@ use Symfony\Component\Mailer\MailerInterface;
|
||||
use Symfony\Component\Messenger\Event\WorkerMessageFailedEvent;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
final class OnGenerationFails implements EventSubscriberInterface
|
||||
final readonly class OnGenerationFails implements EventSubscriberInterface
|
||||
{
|
||||
public const LOG_PREFIX = '[docgen failed] ';
|
||||
|
||||
|
@@ -26,11 +26,11 @@ use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
|
||||
*/
|
||||
class RequestGenerationHandler implements MessageHandlerInterface
|
||||
{
|
||||
public const AUTHORIZED_TRIALS = 5;
|
||||
final public const AUTHORIZED_TRIALS = 5;
|
||||
|
||||
private const LOG_PREFIX = '[docgen message handler] ';
|
||||
|
||||
public function __construct(private DocGeneratorTemplateRepository $docGeneratorTemplateRepository, private EntityManagerInterface $entityManager, private Generator $generator, private LoggerInterface $logger, private StoredObjectRepository $storedObjectRepository, private UserRepositoryInterface $userRepository)
|
||||
public function __construct(private readonly DocGeneratorTemplateRepository $docGeneratorTemplateRepository, private readonly EntityManagerInterface $entityManager, private readonly Generator $generator, private readonly LoggerInterface $logger, private readonly StoredObjectRepository $storedObjectRepository, private readonly UserRepositoryInterface $userRepository)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -17,20 +17,20 @@ use Chill\MainBundle\Entity\User;
|
||||
|
||||
class RequestGenerationMessage
|
||||
{
|
||||
private int $creatorId;
|
||||
private readonly int $creatorId;
|
||||
|
||||
private int $templateId;
|
||||
private readonly int $templateId;
|
||||
|
||||
private int $destinationStoredObjectId;
|
||||
private readonly int $destinationStoredObjectId;
|
||||
|
||||
private \DateTimeImmutable $createdAt;
|
||||
private readonly \DateTimeImmutable $createdAt;
|
||||
|
||||
public function __construct(
|
||||
User $creator,
|
||||
DocGeneratorTemplate $template,
|
||||
private int $entityId,
|
||||
private readonly int $entityId,
|
||||
StoredObject $destinationStoredObject,
|
||||
private array $contextGenerationData
|
||||
private readonly array $contextGenerationData
|
||||
) {
|
||||
$this->creatorId = $creator->getId();
|
||||
$this->templateId = $template->getId();
|
||||
|
Reference in New Issue
Block a user