Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed May 2, 2018
1 parent 07e1c5e commit 1bf54d2
Showing 1 changed file with 8 additions and 16 deletions.
24 changes: 8 additions & 16 deletions src/Illuminate/Console/Scheduling/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -459,19 +459,15 @@ public function pingBefore($url)
}

/**
* Register a callback to ping a given URL before the job runs if condition is true.
* Register a callback to ping a given URL before the job runs if the given condition is true.
*
* @param bool $condition
* @param bool $value
* @param string $url
* @return $this
*/
public function pingBeforeIf(bool $condition, string $url)
public function pingBeforeIf($value, $url)
{
if ($condition) {
return $this->pingBefore($url);
}

return $this;
return $value ? $this->pingBefore($url) : $this;
}

/**
Expand All @@ -488,19 +484,15 @@ public function thenPing($url)
}

/**
* Register a callback to ping a given URL after the job runs if condition is true.
* Register a callback to ping a given URL after the job runs if the given condition is true.
*
* @param bool $condition
* @param bool $value
* @param string $url
* @return $this
*/
public function thenPingIf(bool $condition, string $url)
public function thenPingIf($value, $url)
{
if ($condition) {
return $this->thenPing($url);
}

return $this;
return $value ? $this->thenPing($url) : $this;
}

/**
Expand Down

0 comments on commit 1bf54d2

Please sign in to comment.