Skip to content

Commit

Permalink
Resolved code review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
DumitracheAdrian committed Apr 19, 2024
1 parent d4e5e03 commit 752312d
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions packages/cron-job/Event/PreCronJobExecutionEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@

class PreCronJobExecutionEvent extends Event
{
private ?string $command;
private string $command;

public function __construct(
private CronJobExecution $execution,
private bool $executionCancelled = false,
?string $command = null
) {
$this->command = $command ?? $this->execution->getCronJob()?->getCommand();
$this->command = $this->execution->getCronJob()->getCommand();
}

public function getExecution(): CronJobExecution
Expand All @@ -36,12 +35,12 @@ public function setExecutionCancelled(bool $executionCancelled): self
return $this;
}

public function getCommand(): ?string
public function getCommand(): string
{
return $this->command;
}

public function setCommand(?string $command): self
public function setCommand(string $command): self
{
$this->command = $command;

Expand Down

0 comments on commit 752312d

Please sign in to comment.