@@ -72,11 +72,11 @@ discard block |
||
72 | 72 | $events = $this->schedule->dueEvents(Yii::$app); |
73 | 73 | |
74 | 74 | foreach ($events as $event) { |
75 | - $this->stdout('Runing scheduled command ' . $event->getSummaryForDisplay() . PHP_EOL); |
|
75 | + $this->stdout('Runing scheduled command '.$event->getSummaryForDisplay().PHP_EOL); |
|
76 | 76 | $event->run(Yii::$app); |
77 | 77 | } |
78 | 78 | if (count($events) == 0) { |
79 | - $this->stdout('No scheduled commands are ready to run.' . PHP_EOL); |
|
79 | + $this->stdout('No scheduled commands are ready to run.'.PHP_EOL); |
|
80 | 80 | } |
81 | 81 | } |
82 | 82 | |
@@ -92,13 +92,13 @@ discard block |
||
92 | 92 | $scheduleFile = Yii::getAlias($this->scheduleFile); |
93 | 93 | |
94 | 94 | if (file_exists($scheduleFile) === false) { |
95 | - $this->stderr("Can not load schedule file {$this->scheduleFile}" . PHP_EOL); |
|
95 | + $this->stderr("Can not load schedule file {$this->scheduleFile}".PHP_EOL); |
|
96 | 96 | |
97 | 97 | return; |
98 | 98 | } |
99 | 99 | $schedule = $this->schedule; |
100 | 100 | |
101 | - call_user_func(function () use ($schedule, $scheduleFile) { |
|
101 | + call_user_func(function() use ($schedule, $scheduleFile) { |
|
102 | 102 | require $scheduleFile; |
103 | 103 | }); |
104 | 104 | } |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | */ |
186 | 186 | public function thenPing($url) |
187 | 187 | { |
188 | - return $this->then(function () use ($url) { |
|
188 | + return $this->then(function() use ($url) { |
|
189 | 189 | (new HttpClient())->get($url); |
190 | 190 | }); |
191 | 191 | } |
@@ -234,7 +234,7 @@ discard block |
||
234 | 234 | } |
235 | 235 | $address = is_array($address) ? $address : func_get_args(); |
236 | 236 | |
237 | - return $this->then(function (Application $app) use ($address) { |
|
237 | + return $this->then(function(Application $app) use ($address) { |
|
238 | 238 | $this->sendEmail($app->mailer, $address); |
239 | 239 | }); |
240 | 240 | } |
@@ -391,8 +391,8 @@ discard block |
||
391 | 391 | { |
392 | 392 | $segments = explode(':', $time); |
393 | 393 | |
394 | - return $this->spliceIntoPosition(2, (int)$segments[0]) |
|
395 | - ->spliceIntoPosition(1, count($segments) == 2 ? (int)$segments[1] : '0'); |
|
394 | + return $this->spliceIntoPosition(2, (int) $segments[0]) |
|
395 | + ->spliceIntoPosition(1, count($segments) == 2 ? (int) $segments[1] : '0'); |
|
396 | 396 | } |
397 | 397 | |
398 | 398 | /** |
@@ -563,7 +563,7 @@ discard block |
||
563 | 563 | */ |
564 | 564 | public function everyNMinutes($minutes) |
565 | 565 | { |
566 | - return $this->cron('*/' . $minutes . ' * * * * *'); |
|
566 | + return $this->cron('*/'.$minutes.' * * * * *'); |
|
567 | 567 | } |
568 | 568 | |
569 | 569 | /** |
@@ -619,9 +619,9 @@ discard block |
||
619 | 619 | */ |
620 | 620 | public function buildCommand() |
621 | 621 | { |
622 | - $command = $this->command . ' >> ' . $this->_output . ' 2>&1 &'; |
|
622 | + $command = $this->command.' >> '.$this->_output.' 2>&1 &'; |
|
623 | 623 | |
624 | - return $this->_user ? 'sudo -u ' . $this->_user . ' ' . $command : $command; |
|
624 | + return $this->_user ? 'sudo -u '.$this->_user.' '.$command : $command; |
|
625 | 625 | } |
626 | 626 | |
627 | 627 | /** |
@@ -648,7 +648,7 @@ discard block |
||
648 | 648 | protected function getEmailSubject() |
649 | 649 | { |
650 | 650 | if ($this->_description) { |
651 | - return 'Scheduled Job Output (' . $this->_description . ')'; |
|
651 | + return 'Scheduled Job Output ('.$this->_description.')'; |
|
652 | 652 | } |
653 | 653 | |
654 | 654 | return 'Scheduled Job Output'; |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | */ |
46 | 46 | public function command($command) |
47 | 47 | { |
48 | - return $this->exec(PHP_BINARY . ' yii ' . $command); |
|
48 | + return $this->exec(PHP_BINARY.' yii '.$command); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | /** |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | */ |
82 | 82 | public function dueEvents(Application $app) |
83 | 83 | { |
84 | - return array_filter($this->_events, function (Event $event) use ($app) { |
|
84 | + return array_filter($this->_events, function(Event $event) use ($app) { |
|
85 | 85 | return $event->isDue($app); |
86 | 86 | }); |
87 | 87 | } |