@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | public function isRunning($pid) |
40 | 40 | { |
41 | 41 | $cmd = sprintf("kill -0 %d 2>&1", $pid); |
42 | - $this->logger->debug(__METHOD__ . ": Exec command: $cmd"); |
|
42 | + $this->logger->debug(__METHOD__.": Exec command: $cmd"); |
|
43 | 43 | exec($cmd, $output, $return_var); |
44 | 44 | $running = ($return_var === 0); |
45 | 45 | return $running; |
@@ -60,13 +60,13 @@ discard block |
||
60 | 60 | if ($wait) { |
61 | 61 | $sleep_time = '0.2'; |
62 | 62 | $cmd = sprintf("kill %d; while ps -p %d; do sleep %s;done;", $pid, $pid, $sleep_time); |
63 | - $this->logger->debug(__METHOD__ . " Exec command: $cmd"); |
|
63 | + $this->logger->debug(__METHOD__." Exec command: $cmd"); |
|
64 | 64 | exec($cmd, $output, $return_var); |
65 | 65 | $killed = ($return_var === 0); |
66 | 66 | if ($killed) { |
67 | - $this->logger->debug(__METHOD__ . " Successfully killed process {$pid}"); |
|
67 | + $this->logger->debug(__METHOD__." Successfully killed process {$pid}"); |
|
68 | 68 | } else { |
69 | - $this->logger->notice(__METHOD__ . " Cannot kill process {$pid}, $output"); |
|
69 | + $this->logger->notice(__METHOD__." Cannot kill process {$pid}, $output"); |
|
70 | 70 | } |
71 | 71 | } else { |
72 | 72 | //@todo |
@@ -51,7 +51,7 @@ |
||
51 | 51 | $process = new Linux\LinuxProcess($logger); |
52 | 52 | break; |
53 | 53 | default: |
54 | - $msg = "System style '" . (string) $style . "' is not supported"; |
|
54 | + $msg = "System style '".(string) $style."' is not supported"; |
|
55 | 55 | throw new UnsupportedSystemException($msg); |
56 | 56 | } |
57 | 57 | return $process; |
@@ -16,7 +16,7 @@ |
||
16 | 16 | * @param bool $wait |
17 | 17 | * @return void |
18 | 18 | */ |
19 | - public function kill($pid, $wait=false); |
|
19 | + public function kill($pid, $wait = false); |
|
20 | 20 | |
21 | 21 | /** |
22 | 22 | * Check whether a pid is running |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | * @param LoggerInterface $logger |
69 | 69 | * |
70 | 70 | */ |
71 | - public function __construct(StandaloneServer\Config $config, LoggerInterface $logger=null) |
|
71 | + public function __construct(StandaloneServer\Config $config, LoggerInterface $logger = null) |
|
72 | 72 | { |
73 | 73 | $this->config = $config; |
74 | 74 | |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | * @param boolean $clearPidFileOnException clear th pid file if the server was not running |
176 | 176 | * @return void |
177 | 177 | */ |
178 | - public function stop($throwException=false, $clearPidFileOnException=false) |
|
178 | + public function stop($throwException = false, $clearPidFileOnException = false) |
|
179 | 179 | { |
180 | 180 | $this->logger->notice("Stopping server"); |
181 | 181 | |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | return; |
203 | 203 | } |
204 | 204 | |
205 | - $killed = $this->process->kill($pid, $wait=true); |
|
205 | + $killed = $this->process->kill($pid, $wait = true); |
|
206 | 206 | |
207 | 207 | try { |
208 | 208 | if (!$killed) { |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | * @param boolean $test_is_running |
245 | 245 | * @return boolean |
246 | 246 | */ |
247 | - public function isStarted($test_is_running=true) |
|
247 | + public function isStarted($test_is_running = true) |
|
248 | 248 | { |
249 | 249 | // In case of previous run, let's us |
250 | 250 | if (!$this->started && $test_is_running) { |
@@ -283,7 +283,7 @@ discard block |
||
283 | 283 | $classpath = implode(':', $jars); |
284 | 284 | $threads = $this->config->getThreads(); |
285 | 285 | |
286 | - $directives = ' -D' . implode(' -D', [ |
|
286 | + $directives = ' -D'.implode(' -D', [ |
|
287 | 287 | 'php.java.bridge.daemon="false"', |
288 | 288 | "php.java.bridge.threads=$threads" |
289 | 289 | ]); |
@@ -349,7 +349,7 @@ discard block |
||
349 | 349 | * @param boolean $throwsException if false discard exception if pidfile not exists |
350 | 350 | * @return boolean |
351 | 351 | */ |
352 | - public function isProcessRunning($throwsException=false) |
|
352 | + public function isProcessRunning($throwsException = false) |
|
353 | 353 | { |
354 | 354 | $running = false; |
355 | 355 | try { |