@@ -183,7 +183,7 @@ |
||
183 | 183 | $cron = $cronList[$id]; |
184 | 184 | |
185 | 185 | $data = array(); |
186 | - $data['file'] = ($type == 'log') ? $cron->getLogFile(): $cron->getErrorFile(); |
|
186 | + $data['file'] = ($type == 'log') ? $cron->getLogFile() : $cron->getErrorFile(); |
|
187 | 187 | $data['content'] = \file_get_contents($data['file']); |
188 | 188 | |
189 | 189 | $serializer = new Serializer(array(), array('json' => new JsonEncoder())); |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | $logSize = filesize($logFile); |
139 | 139 | } |
140 | 140 | if (isset($errorFile) && file_exists($errorFile)) { |
141 | - $lastRunTime = max($lastRunTime ? : 0, filemtime($errorFile)); |
|
141 | + $lastRunTime = max($lastRunTime ?: 0, filemtime($errorFile)); |
|
142 | 142 | $errorSize = filesize($errorFile); |
143 | 143 | } |
144 | 144 | |
@@ -476,15 +476,15 @@ discard block |
||
476 | 476 | $cronLine .= '#suspended: '; |
477 | 477 | } |
478 | 478 | |
479 | - $cronLine .= $this->getExpression() . ' ' . $this->command; |
|
479 | + $cronLine .= $this->getExpression().' '.$this->command; |
|
480 | 480 | if ('' != $this->logFile) { |
481 | - $cronLine .= ' > ' . $this->logFile; |
|
481 | + $cronLine .= ' > '.$this->logFile; |
|
482 | 482 | } |
483 | 483 | if ('' != $this->errorFile) { |
484 | - $cronLine .= ' 2> ' . $this->errorFile; |
|
484 | + $cronLine .= ' 2> '.$this->errorFile; |
|
485 | 485 | } |
486 | 486 | if ('' != $this->comment) { |
487 | - $cronLine .= ' #' . $this->comment; |
|
487 | + $cronLine .= ' #'.$this->comment; |
|
488 | 488 | } |
489 | 489 | return $cronLine; |
490 | 490 | } |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | // parsing cron file |
35 | 35 | $process = new Process('crontab -l'); |
36 | 36 | $process->run(); |
37 | - $lines = array_filter(explode(PHP_EOL, $process->getOutput()), function ($line) { |
|
37 | + $lines = array_filter(explode(PHP_EOL, $process->getOutput()), function($line) { |
|
38 | 38 | return '' != trim($line); |
39 | 39 | }); |
40 | 40 | |
@@ -44,10 +44,10 @@ discard block |
||
44 | 44 | try { |
45 | 45 | $line = Cron::parse($line); |
46 | 46 | } catch (\Exception $e) { |
47 | - $process->addErrorOutput('CronManager was unable to parse crontab at line ' . $lineNumber); |
|
47 | + $process->addErrorOutput('CronManager was unable to parse crontab at line '.$lineNumber); |
|
48 | 48 | } |
49 | 49 | } |
50 | - $this->lines['l' . $lineNumber] = $line; |
|
50 | + $this->lines['l'.$lineNumber] = $line; |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | $this->error = $process->getErrorOutput(); |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | */ |
61 | 61 | public function get() |
62 | 62 | { |
63 | - return array_filter($this->lines, function ($line) { |
|
63 | + return array_filter($this->lines, function($line) { |
|
64 | 64 | return $line instanceof Cron; |
65 | 65 | }); |
66 | 66 | } |
@@ -96,9 +96,9 @@ discard block |
||
96 | 96 | { |
97 | 97 | $file = tempnam(sys_get_temp_dir(), 'cron'); |
98 | 98 | |
99 | - file_put_contents($file, $this->getRaw() . PHP_EOL); |
|
99 | + file_put_contents($file, $this->getRaw().PHP_EOL); |
|
100 | 100 | |
101 | - $process = new Process('crontab ' . $file); |
|
101 | + $process = new Process('crontab '.$file); |
|
102 | 102 | $process->run(); |
103 | 103 | |
104 | 104 | $this->error = $process->getErrorOutput(); |
@@ -14,7 +14,7 @@ |
||
14 | 14 | */ |
15 | 15 | public function load(array $configs, ContainerBuilder $container) |
16 | 16 | { |
17 | - $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
17 | + $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
18 | 18 | $loader->load('services.xml'); |
19 | 19 | } |
20 | 20 | } |
@@ -30,7 +30,7 @@ |
||
30 | 30 | ]; |
31 | 31 | } |
32 | 32 | $this->logDir = $logDir; |
33 | - $this->symfonyCommand = 'php ' . $kernelDir . '/console'; |
|
33 | + $this->symfonyCommand = 'php '.$kernelDir.'/console'; |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | public function getGlobals() |