@@ -141,7 +141,7 @@ discard block |
||
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 |
||
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(); |
@@ -62,7 +62,7 @@ discard block |
||
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 |
||
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( |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | public function isRunning() |
92 | 92 | { |
93 | 93 | $this->checkSupportingOS('Cocur\BackgroundProcess can only check if a process is running on *nix-based '. |
94 | - 'systems, such as Unix, Linux or Mac OS X. You are running "%s".'); |
|
94 | + 'systems, such as Unix, Linux or Mac OS X. You are running "%s".'); |
|
95 | 95 | |
96 | 96 | try { |
97 | 97 | $result = shell_exec(sprintf('kill -0 %d 2>&1', $this->pid)); |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | public function stop() |
113 | 113 | { |
114 | 114 | $this->checkSupportingOS('Cocur\BackgroundProcess can only stop a process on *nix-based systems, such as '. |
115 | - 'Unix, Linux or Mac OS X. You are running "%s".'); |
|
115 | + 'Unix, Linux or Mac OS X. You are running "%s".'); |
|
116 | 116 | |
117 | 117 | try { |
118 | 118 | $result = shell_exec(sprintf('kill %d 2>&1', $this->pid)); |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | public function getPid() |
134 | 134 | { |
135 | 135 | $this->checkSupportingOS('Cocur\BackgroundProcess can only return the PID of a process on *nix-based systems, '. |
136 | - 'such as Unix, Linux or Mac OS X. You are running "%s".'); |
|
136 | + 'such as Unix, Linux or Mac OS X. You are running "%s".'); |
|
137 | 137 | |
138 | 138 | return $this->pid; |
139 | 139 | } |