| Conditions | 4 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 13 |
| Ratio | 100 % |
| Tests | 2 |
| CRAP Score | 10.75 |
| Changes | 0 | ||
| 1 | <?php |
||
| 66 | 2 | View Code Duplication | private function stopInstances($file) |
| 67 | { |
||
| 68 | 2 | if (file_exists($file)) { |
|
| 69 | $content = explode(PHP_EOL, file_get_contents($file)); |
||
| 70 | |||
| 71 | if (count($content)) { |
||
| 72 | foreach ($content as $pid) { |
||
| 73 | $pid = (int) trim($pid); |
||
| 74 | |||
| 75 | posix_kill($pid, 9); |
||
| 76 | } |
||
| 77 | } |
||
| 78 | exec('rm '.$file); |
||
| 79 | } |
||
| 82 |