Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Entity/Task.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function getInterval()
/**
* {@inheritdoc}
*/
public function setInterval(CronExpression $interval, \DateTimeImmutable $firstExecution = null, \DateTimeImmutable $lastExecution = null)
public function setInterval(CronExpression $interval, ?\DateTimeImmutable $firstExecution = null, ?\DateTimeImmutable $lastExecution = null)
{
parent::setInterval($interval, $firstExecution, $lastExecution);

Expand Down
2 changes: 1 addition & 1 deletion src/Entity/TaskExecutionRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public function findByTaskUuid($taskUuid)
/**
* {@inheritdoc}
*/
public function findNextScheduled(\DateTimeImmutable $dateTime = null, array $skippedExecutions = [])
public function findNextScheduled(?\DateTimeImmutable $dateTime = null, array $skippedExecutions = [])
{
$queryBuilder = $this->createQueryBuilder('e')
->innerJoin('e.task', 't')
Expand Down
2 changes: 1 addition & 1 deletion src/EventListener/DoctrineTaskExecutionListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class DoctrineTaskExecutionListener
/**
* @param EntityManagerInterface $entityManager
*/
public function __construct(EntityManagerInterface $entityManager = null)
public function __construct(?EntityManagerInterface $entityManager = null)
{
$this->entityManager = $entityManager;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Functional/BaseCommandTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ protected function setUp(): void
*
* @return TaskInterface
*/
protected function createTask($workload, CronExpression $cronExpression = null, $handlerClass = TestHandler::class)
protected function createTask($workload, ?CronExpression $cronExpression = null, $handlerClass = TestHandler::class)
{
$task = $this->taskRepository->create($handlerClass, $workload);
if ($cronExpression) {
Expand Down
2 changes: 1 addition & 1 deletion tests/Functional/Entity/TaskExecutionRepositoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public function testFindScheduledSkipped()
*
* @return TaskExecutionInterface
*/
private function save(TaskInterface $task = null, \DateTimeImmutable $scheduleTime = null, $status = TaskStatus::PLANNED)
private function save(?TaskInterface $task = null, ?\DateTimeImmutable $scheduleTime = null, $status = TaskStatus::PLANNED)
{
if (!$scheduleTime) {
$scheduleTime = new \DateTimeImmutable();
Expand Down
Loading