Skip to content

Commit

Permalink
Add singular syntactic sugar (laravel#38815)
Browse files Browse the repository at this point in the history
  • Loading branch information
dwightwatson authored Sep 15, 2021
1 parent 089ce46 commit 913c2a1
Showing 1 changed file with 77 additions and 0 deletions.
77 changes: 77 additions & 0 deletions src/Illuminate/Foundation/Testing/Wormhole.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,17 @@ public function __construct($value)
$this->value = $value;
}

/**
* Travel forward the given number of milliseconds.
*
* @param callable|null $callback
* @return mixed
*/
public function millisecond($callback = null)
{
return $this->milliseconds($callback);
}

/**
* Travel forward the given number of milliseconds.
*
Expand All @@ -37,6 +48,17 @@ public function milliseconds($callback = null)
return $this->handleCallback($callback);
}

/**
* Travel forward the given number of seconds.
*
* @param callable|null $callback
* @return mixed
*/
public function second($callback = null)
{
return $this->seconds($callback);
}

/**
* Travel forward the given number of seconds.
*
Expand All @@ -63,6 +85,17 @@ public function minutes($callback = null)
return $this->handleCallback($callback);
}

/**
* Travel forward the given number of hours.
*
* @param callable|null $callback
* @return mixed
*/
public function hour($callback = null)
{
return $this->hours($callback);
}

/**
* Travel forward the given number of hours.
*
Expand All @@ -76,6 +109,17 @@ public function hours($callback = null)
return $this->handleCallback($callback);
}

/**
* Travel forward the given number of days.
*
* @param callable|null $callback
* @return mixed
*/
public function day($callback = null)
{
return $this->days($callback);
}

/**
* Travel forward the given number of days.
*
Expand All @@ -89,6 +133,17 @@ public function days($callback = null)
return $this->handleCallback($callback);
}

/**
* Travel forward the given number of weeks.
*
* @param callable|null $callback
* @return mixed
*/
public function week($callback = null)
{
return $this->weeks($callback);
}

/**
* Travel forward the given number of weeks.
*
Expand All @@ -102,6 +157,17 @@ public function weeks($callback = null)
return $this->handleCallback($callback);
}

/**
* Travel forward the given number of months.
*
* @param callable|null $callback
* @return mixed
*/
public function month($callback = null)
{
return $this->months($callback);
}

/**
* Travel forward the given number of months.
*
Expand All @@ -115,6 +181,17 @@ public function months($callback = null)
return $this->handleCallback($callback);
}

/**
* Travel forward the given number of years.
*
* @param callable|null $callback
* @return mixed
*/
public function year($callback = null)
{
return $this->years($callback);
}

/**
* Travel forward the given number of years.
*
Expand Down

0 comments on commit 913c2a1

Please sign in to comment.