| @@ -100,6 +100,9 @@ discard block | ||
| 100 | 100 | */ | 
| 101 | 101 | public $description; | 
| 102 | 102 | |
| 103 | + /** | |
| 104 | + * @param string $command | |
| 105 | + */ | |
| 103 | 106 | public function __construct(/* string */ $command) | 
| 104 | 107 |      { | 
| 105 | 108 | Assert::stringNotEmpty($command); | 
| @@ -201,7 +204,6 @@ discard block | ||
| 201 | 204 | /** | 
| 202 | 205 | * Do not allow the event to overlap each other. | 
| 203 | 206 | * | 
| 204 | - * @param string|int $safe_duration | |
| 205 | 207 | * | 
| 206 | 208 | * @return $this | 
| 207 | 209 | */ | 
| @@ -532,7 +534,7 @@ discard block | ||
| 532 | 534 | /** | 
| 533 | 535 | * Set the days of the week the command should run on. | 
| 534 | 536 | * | 
| 535 | - * @param array|mixed $days | |
| 537 | + * @param integer $days | |
| 536 | 538 | * @return $this | 
| 537 | 539 | */ | 
| 538 | 540 | public function days($days) | 
| @@ -119,25 +119,25 @@ discard block | ||
| 119 | 119 | $command = ''; | 
| 120 | 120 | |
| 121 | 121 |          if ($this->mutuallyExclusive) { | 
| 122 | - $command .= '(touch ' . $this->getMutexPath() . '; '; | |
| 122 | + $command .= '(touch '.$this->getMutexPath().'; '; | |
| 123 | 123 | } | 
| 124 | 124 | |
| 125 | 125 |          if ($this->cwd) { | 
| 126 | - $command .= 'cd ' . $this->cwd . '; '; | |
| 126 | + $command .= 'cd '.$this->cwd.'; '; | |
| 127 | 127 | } | 
| 128 | 128 | |
| 129 | 129 |          if ($this->user) { | 
| 130 | - $command .= 'sudo -u ' . $this->user . '; '; | |
| 130 | + $command .= 'sudo -u '.$this->user.'; '; | |
| 131 | 131 | } | 
| 132 | 132 | |
| 133 | 133 | $command .= $this->command; | 
| 134 | 134 | |
| 135 | 135 |          if ($this->mutuallyExclusive) { | 
| 136 | - $command .= ' ; rm ' . $this->getMutexPath() . ');'; | |
| 136 | + $command .= ' ; rm '.$this->getMutexPath().');'; | |
| 137 | 137 | } | 
| 138 | 138 | |
| 139 | 139 | // e.g. 1>> /dev/null 2>> /dev/null | 
| 140 | - $command .= ' 1' . $redirect . ' ' . $this->output . ' 2' . $redirect . ' ' . $this->errorOutput; | |
| 140 | + $command .= ' 1'.$redirect.' '.$this->output.' 2'.$redirect.' '.$this->errorOutput; | |
| 141 | 141 | |
| 142 | 142 | return $command; | 
| 143 | 143 | } | 
| @@ -184,7 +184,7 @@ discard block | ||
| 184 | 184 | protected function runCommandInBackground() | 
| 185 | 185 |      { | 
| 186 | 186 | (new Process( | 
| 187 | - $this->compileCommand() . ' &', $this->cwd, null, null, null | |
| 187 | + $this->compileCommand().' &', $this->cwd, null, null, null | |
| 188 | 188 | ))->run(); | 
| 189 | 189 | } | 
| 190 | 190 | |
| @@ -195,7 +195,7 @@ discard block | ||
| 195 | 195 | */ | 
| 196 | 196 | protected function getMutexPath() | 
| 197 | 197 |      { | 
| 198 | - return rtrim(sys_get_temp_dir(), '/') . '/scheduled-event-' . md5($this->cwd . $this->command->getName()); | |
| 198 | + return rtrim(sys_get_temp_dir(), '/').'/scheduled-event-'.md5($this->cwd.$this->command->getName()); | |
| 199 | 199 | } | 
| 200 | 200 | |
| 201 | 201 | /** | 
| @@ -260,7 +260,7 @@ discard block | ||
| 260 | 260 | */ | 
| 261 | 261 | private function inTimeInterval($startTime, $endTime) | 
| 262 | 262 |      { | 
| 263 | -        return function () use ($startTime, $endTime) { | |
| 263 | +        return function() use ($startTime, $endTime) { | |
| 264 | 264 | $now = Carbon::now()->getTimestamp(); | 
| 265 | 265 | return $now >= strtotime($startTime) && $now <= strtotime($endTime); | 
| 266 | 266 | }; | 
| @@ -36,7 +36,7 @@ | ||
| 36 | 36 | */ | 
| 37 | 37 | public function dueEvents() | 
| 38 | 38 |      { | 
| 39 | -        return array_filter($this->events, function (Event $event) { | |
| 39 | +        return array_filter($this->events, function(Event $event) { | |
| 40 | 40 | return $event->isDue(); | 
| 41 | 41 | }); | 
| 42 | 42 | } |