diff --git a/src/Exception/CommandJobException.php b/src/Exception/CommandJobException.php index e24433e..779493f 100644 --- a/src/Exception/CommandJobException.php +++ b/src/Exception/CommandJobException.php @@ -6,7 +6,7 @@ class CommandJobException extends Exception { - public function __construct($message = null, $code = 0, Exception $previous = null) + public function __construct(string $message = '', int $code = 0, ?Exception $previous = null) { parent::__construct($message, $code, $previous); } diff --git a/src/Service/CommandJobFactory.php b/src/Service/CommandJobFactory.php index 4b623b8..69d93e5 100644 --- a/src/Service/CommandJobFactory.php +++ b/src/Service/CommandJobFactory.php @@ -43,7 +43,7 @@ public function __construct( * @throws ORMException * @throws OptimisticLockException */ - public function createCommandJob(string $commandName, array $commandParams, int $entityId = null, string $entityClassName = null, Job $parentJob = null, JobRecurring $parentJobRecurring = null, ?DateTimeImmutable $postponedStartAt = null): Job + public function createCommandJob(string $commandName, array $commandParams, ?int $entityId = null, ?string $entityClassName = null, ?Job $parentJob = null, ?JobRecurring $parentJobRecurring = null, ?DateTimeImmutable $postponedStartAt = null): Job { // Check if user is loaded and is granted job creation if ($this->security->getUser() && !$this->security->isGranted(JobQueuePermissions::ROLE_JOB_CREATE)) {