Skip to content
Open
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
10 changes: 5 additions & 5 deletions src/GO/Job.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,10 @@ public function getId()
* the job is due. Defaults to job creation time.
* It also defaults the execution time if not previously defined.
*
* @param DateTime $date
* @param DateTime|null $date
* @return bool
*/
public function isDue(DateTime $date = null)
public function isDue(?DateTime $date = null)
{
// The execution time is being defaulted if not defined
if (! $this->executionTime) {
Expand Down Expand Up @@ -253,11 +253,11 @@ public function canRunInBackground()
* being executed if the previous is still running.
* The job id is used as a filename for the lock file.
*
* @param string $tempDir The directory path for the lock files
* @param callable $whenOverlapping A callback to ignore job overlapping
* @param string $tempDir The directory path for the lock files
* @param callable|null $whenOverlapping A callback to ignore job overlapping
* @return self
*/
public function onlyOne($tempDir = null, callable $whenOverlapping = null)
public function onlyOne($tempDir = null, ?callable $whenOverlapping = null)
{
if ($tempDir === null || ! is_dir($tempDir)) {
$tempDir = $this->tempDir;
Expand Down
4 changes: 2 additions & 2 deletions src/GO/Scheduler.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,10 @@ public function raw($command, $args = [], $id = null)
/**
* Run the scheduler.
*
* @param DateTime $runTime Optional, run at specific moment
* @param DateTime|null $runTime Optional, run at specific moment
* @return array Executed jobs
*/
public function run(Datetime $runTime = null)
public function run(?Datetime $runTime = null)
{
$jobs = $this->getQueuedJobs();

Expand Down