From 1bf54d23b5d2207d7c60a549584c774f9ff8386b Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 2 May 2018 09:47:56 -0500 Subject: [PATCH] formatting --- src/Illuminate/Console/Scheduling/Event.php | 24 +++++++-------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/src/Illuminate/Console/Scheduling/Event.php b/src/Illuminate/Console/Scheduling/Event.php index 4a662538f294..41c1c82bd001 100644 --- a/src/Illuminate/Console/Scheduling/Event.php +++ b/src/Illuminate/Console/Scheduling/Event.php @@ -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; } /** @@ -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; } /**