@@ -73,7 +73,7 @@ |
||
73 | 73 | } |
74 | 74 | } |
75 | 75 | if (!in_array($this->options['backend'], $this->supportedBackends)) { |
76 | - throw new \InvalidArgumentException("Unsupported backend '" . $this->options['backend'] . "'"); |
|
76 | + throw new \InvalidArgumentException("Unsupported backend '".$this->options['backend']."'"); |
|
77 | 77 | } |
78 | 78 | } |
79 | 79 |
@@ -59,7 +59,7 @@ |
||
59 | 59 | $this->server = new StandaloneServer($config, $logger); |
60 | 60 | $this->server->restart(); |
61 | 61 | |
62 | - $logger->debug("Server output: \n" . $this->server->getOutput()); |
|
62 | + $logger->debug("Server output: \n".$this->server->getOutput()); |
|
63 | 63 | |
64 | 64 | $output->writeln("Server successfully restarted on port $port"); |
65 | 65 | return 0; |
@@ -23,15 +23,15 @@ |
||
23 | 23 | protected function configure() |
24 | 24 | { |
25 | 25 | $this->setName('pjbserver:restart') |
26 | - ->setDescription( |
|
27 | - 'Restart the standalone pjb server (java)' |
|
28 | - ) |
|
29 | - ->addArgument( |
|
26 | + ->setDescription( |
|
27 | + 'Restart the standalone pjb server (java)' |
|
28 | + ) |
|
29 | + ->addArgument( |
|
30 | 30 | 'config-file', |
31 | 31 | InputArgument::REQUIRED, |
32 | 32 | 'Configuration file, see ./dist/pjbserver.config.php.dist' |
33 | - ) |
|
34 | - ->setHelp(<<<'EOT' |
|
33 | + ) |
|
34 | + ->setHelp(<<<'EOT' |
|
35 | 35 | Start the php java bridge server in the background. |
36 | 36 | EOT |
37 | 37 | ); |
@@ -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; |
@@ -279,7 +279,7 @@ |
||
279 | 279 | $classpath = implode(':', $jars); |
280 | 280 | $threads = $this->config->getThreads(); |
281 | 281 | |
282 | - $directives = ' -D' . implode(' -D', [ |
|
282 | + $directives = ' -D'.implode(' -D', [ |
|
283 | 283 | 'php.java.bridge.daemon="false"', |
284 | 284 | "php.java.bridge.threads=$threads" |
285 | 285 | ]); |
@@ -24,16 +24,16 @@ |
||
24 | 24 | protected function configure() |
25 | 25 | { |
26 | 26 | $this->setName('pjbserver:status') |
27 | - ->setDescription( |
|
28 | - 'Get the status of the standalone pjb server (java)' |
|
29 | - ) |
|
27 | + ->setDescription( |
|
28 | + 'Get the status of the standalone pjb server (java)' |
|
29 | + ) |
|
30 | 30 | ->addArgument( |
31 | 31 | 'config-file', |
32 | 32 | InputArgument::REQUIRED, |
33 | 33 | 'Configuration file, see ./dist/pjbserver.config.php.dist' |
34 | 34 | ) |
35 | 35 | |
36 | - ->setHelp(<<<'EOT' |
|
36 | + ->setHelp(<<<'EOT' |
|
37 | 37 | Get the status of the php java bridge server in the background. |
38 | 38 | EOT |
39 | 39 | ); |
@@ -24,11 +24,11 @@ |
||
24 | 24 | */ |
25 | 25 | public function logServerConfig(ConsoleLogger $logger, Config $config) |
26 | 26 | { |
27 | - $logger->info('* config port :' . $config->getPort()); |
|
28 | - $logger->info('* config log_file :' . $config->getLogFile()); |
|
29 | - $logger->info('* config pid_file :' . $config->getPidFile()); |
|
30 | - $logger->info('* config classpaths :' . implode(',', $config->getClasspaths())); |
|
31 | - $logger->info('* config java_bin :' . $config->getJavaBin()); |
|
32 | - $logger->info('* config server_jar :' . $config->getServerJar()); |
|
27 | + $logger->info('* config port :'.$config->getPort()); |
|
28 | + $logger->info('* config log_file :'.$config->getLogFile()); |
|
29 | + $logger->info('* config pid_file :'.$config->getPidFile()); |
|
30 | + $logger->info('* config classpaths :'.implode(',', $config->getClasspaths())); |
|
31 | + $logger->info('* config java_bin :'.$config->getJavaBin()); |
|
32 | + $logger->info('* config server_jar :'.$config->getServerJar()); |
|
33 | 33 | } |
34 | 34 | } |
@@ -23,16 +23,16 @@ |
||
23 | 23 | protected function configure() |
24 | 24 | { |
25 | 25 | $this->setName('pjbserver:start') |
26 | - ->setDescription( |
|
27 | - 'Start the standalone pjb server (java)' |
|
28 | - ) |
|
26 | + ->setDescription( |
|
27 | + 'Start the standalone pjb server (java)' |
|
28 | + ) |
|
29 | 29 | ->addArgument( |
30 | 30 | 'config-file', |
31 | 31 | InputArgument::REQUIRED, |
32 | 32 | 'Configuration file, see ./dist/pjbserver.config.php.dist' |
33 | 33 | ) |
34 | 34 | |
35 | - ->setHelp(<<<'EOT' |
|
35 | + ->setHelp(<<<'EOT' |
|
36 | 36 | Start the php java bridge server in the background. |
37 | 37 | EOT |
38 | 38 | ); |
@@ -23,16 +23,16 @@ |
||
23 | 23 | protected function configure() |
24 | 24 | { |
25 | 25 | $this->setName('pjbserver:reveal') |
26 | - ->setDescription( |
|
27 | - 'Print the underlying java cli command' |
|
28 | - ) |
|
26 | + ->setDescription( |
|
27 | + 'Print the underlying java cli command' |
|
28 | + ) |
|
29 | 29 | ->addArgument( |
30 | 30 | 'config-file', |
31 | 31 | InputArgument::REQUIRED, |
32 | 32 | 'Configuration file, see ./dist/pjbserver.config.php.dist' |
33 | 33 | ) |
34 | 34 | |
35 | - ->setHelp(<<<'EOT' |
|
35 | + ->setHelp(<<<'EOT' |
|
36 | 36 | Echo the underlying cli command (call to java) that will be called. |
37 | 37 | EOT |
38 | 38 | ); |