Completed
Push — master ( 7a2ee1...9ae290 )
by Florian
02:06
created
src/BackgroundProcess.php 3 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
     public function isRunning()
87 87
     {
88 88
         $this->checkSupportingOS('Cocur\BackgroundProcess can only check if a process is running on *nix-based '.
89
-                                 'systems, such as Unix, Linux or Mac OS X. You are running "%s".');
89
+                                    'systems, such as Unix, Linux or Mac OS X. You are running "%s".');
90 90
 
91 91
         try {
92 92
             $result = shell_exec(sprintf('ps %d 2>&1', $this->pid));
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
     public function stop()
108 108
     {
109 109
         $this->checkSupportingOS('Cocur\BackgroundProcess can only stop a process on *nix-based systems, such as '.
110
-                                 'Unix, Linux or Mac OS X. You are running "%s".');
110
+                                    'Unix, Linux or Mac OS X. You are running "%s".');
111 111
 
112 112
         try {
113 113
             $result = shell_exec(sprintf('kill %d 2>&1', $this->pid));
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
     public function getPid()
129 129
     {
130 130
         $this->checkSupportingOS('Cocur\BackgroundProcess can only return the PID of a process on *nix-based systems, '.
131
-                                 'such as Unix, Linux or Mac OS X. You are running "%s".');
131
+                                    'such as Unix, Linux or Mac OS X. You are running "%s".');
132 132
 
133 133
         return $this->pid;
134 134
     }
Please login to merge, or discard this patch.
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
     /**
142 142
      * Set the process id.
143 143
      *
144
-     * @param $pid
144
+     * @param integer $pid
145 145
      */
146 146
     protected function setPid($pid)
147 147
     {
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
     /**
182 182
      * @param int $pid PID of process to resume
183 183
      *
184
-     * @return Cocur\BackgroundProcess\BackgroundProcess
184
+     * @return BackgroundProcess
185 185
      */
186 186
     static public function createFromPID($pid) {
187 187
         $process = new self();
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 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(
Please login to merge, or discard this patch.