Completed
Push — master ( 34fefe...4d65b3 )
by Sébastien
03:46
created
src/PjbServer/Tools/Network/PortTester.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/PjbServer/Tools/StandaloneServer/Config.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
      */
145 145
     protected function getDefaultConfig($port)
146 146
     {
147
-        $base_dir = realpath(__DIR__ . '/../../../../');
147
+        $base_dir = realpath(__DIR__.'/../../../../');
148 148
         $config = [];
149 149
         foreach ($this->default_config as $key => $value) {
150 150
             $tmp = str_replace('{base_dir}', $base_dir, $value);
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
 
172 172
         // Step 2: server_jar file must exists
173 173
         if (!is_file($config['server_jar']) || !is_readable($config['server_jar'])) {
174
-            throw new Exception\InvalidArgumentException("Server jar file not exists or unreadable. server-jar: '" . $config['server_jar'] ."'");
174
+            throw new Exception\InvalidArgumentException("Server jar file not exists or unreadable. server-jar: '".$config['server_jar']."'");
175 175
         }
176 176
 
177 177
         // Step 3: log and pid file should be creatable
Please login to merge, or discard this patch.
src/PjbServer/Tools/StandaloneServer.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      * @param LoggerInterface $logger
62 62
      *
63 63
      */
64
-    public function __construct(StandaloneServer\Config $config, LoggerInterface $logger=null)
64
+    public function __construct(StandaloneServer\Config $config, LoggerInterface $logger = null)
65 65
     {
66 66
         $this->config = $config;
67 67
 
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
         $pid_file = $this->config->getPidFile();
174 174
         try {
175 175
             $pid = $this->getPid();
176
-            $running = $this->isProcessRunning($throws_exception=true);
176
+            $running = $this->isProcessRunning($throws_exception = true);
177 177
             if (!$running) {
178 178
                 if ($throws_exception) {
179 179
                     $msg = "Cannot stop: pid exists ($pid) but server process is not running";
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
         $jars[] = $this->config->getServerJar();
249 249
         $classpath = implode(':', $jars);
250 250
 
251
-        $directives = ' -D' . implode(' -D', [
251
+        $directives = ' -D'.implode(' -D', [
252 252
                     'php.java.bridge.daemon="false"',
253 253
                     'php.java.bridge.threads=30'
254 254
         ]);
Please login to merge, or discard this patch.
src/PjbServer/Tools/Console/Command/PjbServerRestartCommand.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -24,15 +24,15 @@
 block discarded – undo
24 24
     protected function configure()
25 25
     {
26 26
         $this->setName('pjbserver:restart')
27
-             ->setDescription(
28
-                 'Restart the standalone pjb server (java)'
29
-               )
30
-             ->addArgument(
27
+                ->setDescription(
28
+                    'Restart the standalone pjb server (java)'
29
+                )
30
+                ->addArgument(
31 31
                 'config-file',
32 32
                 InputArgument::REQUIRED,
33 33
                 'Configuration file, see ./dist/pjbserver.config.php.dist'
34
-               )
35
-             ->setHelp(<<<EOT
34
+                )
35
+                ->setHelp(<<<EOT
36 36
 Start the php java bridge server in the background.
37 37
 EOT
38 38
         );
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,6 +54,6 @@
 block discarded – undo
54 54
         $this->server = new StandaloneServer($config);
55 55
         $this->server->restart();
56 56
 
57
-        $output->write("Server successfully restarted on port $port" . PHP_EOL);
57
+        $output->write("Server successfully restarted on port $port".PHP_EOL);
58 58
     }
59 59
 }
Please login to merge, or discard this patch.
src/PjbServer/Tools/Console/Command/PjbServerStopCommand.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,15 +24,15 @@
 block discarded – undo
24 24
     protected function configure()
25 25
     {
26 26
         $this->setName('pjbserver:stop')
27
-             ->setDescription(
28
-                 'Stop the standalone pjb server (java)'
29
-               )
27
+                ->setDescription(
28
+                    'Stop 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
-             ->setHelp(<<<EOT
35
+                ->setHelp(<<<EOT
36 36
 Stop the standalone php java bridge server (running in the background).
37 37
 EOT
38 38
         );
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,6 +55,6 @@
 block discarded – undo
55 55
 
56 56
         $this->server->stop();
57 57
 
58
-        $output->write("Server running on port $port successfully stopped" . PHP_EOL);
58
+        $output->write("Server running on port $port successfully stopped".PHP_EOL);
59 59
     }
60 60
 }
Please login to merge, or discard this patch.
src/PjbServer/Tools/Console/Command/PjbServerStartCommand.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,16 +24,16 @@
 block discarded – undo
24 24
     protected function configure()
25 25
     {
26 26
         $this->setName('pjbserver:start')
27
-             ->setDescription(
28
-                 'Start the standalone pjb server (java)'
29
-               )
27
+                ->setDescription(
28
+                    'Start 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
 Start the php java bridge server in the background.
38 38
 EOT
39 39
         );
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,6 +56,6 @@
 block discarded – undo
56 56
         $this->server = new StandaloneServer($config);
57 57
         $this->server->start();
58 58
 
59
-        $output->write("Server successfully started on port $port" . PHP_EOL);
59
+        $output->write("Server successfully started on port $port".PHP_EOL);
60 60
     }
61 61
 }
Please login to merge, or discard this patch.