Completed
Pull Request — master (#35)
by
unknown
01:46
created
src/BackgroundProcess.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
      */
63 63
     public function run($outputFile = '/dev/null', $append = false)
64 64
     {
65
-        if($this->command === null) {
65
+        if ($this->command === null) {
66 66
             return;
67 67
         }
68 68
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
                 shell_exec(sprintf('%s &', $this->command, $outputFile));
72 72
                 break;
73 73
             case self::OS_NIX:
74
-                $this->pid = (int)shell_exec(sprintf('%s %s %s 2>&1 & echo $!', $this->command, ($append) ? '>>' : '>', $outputFile));
74
+                $this->pid = (int) shell_exec(sprintf('%s %s %s 2>&1 & echo $!', $this->command, ($append) ? '>>' : '>', $outputFile));
75 75
                 break;
76 76
             default:
77 77
                 throw new RuntimeException(sprintf(
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
         try {
97 97
             $result = shell_exec("ps -ef | awk '{print $1}'");
98 98
             $pidArray = explode(PHP_EOL, $result);
99
-            if (in_array($this->pid,$pidArray) && !preg_match('/ERROR: Process ID out of range/', $result)) {
99
+            if (in_array($this->pid, $pidArray) && !preg_match('/ERROR: Process ID out of range/', $result)) {
100 100
                 return true;
101 101
             }
102 102
         } catch (Exception $e) {
Please login to merge, or discard this patch.