| Conditions | 4 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 4 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 73 | 4 | private function stopInstances($filename) |
|
| 74 | { |
||
| 75 | 4 | if (file_exists($filename)) { |
|
| 76 | 2 | $content = explode(PHP_EOL, file_get_contents($filename)); |
|
| 77 | |||
| 78 | 2 | if (count($content)) { |
|
| 79 | 2 | foreach ($content as $pid) { |
|
| 80 | 2 | $pid = (int) trim($pid); |
|
| 81 | |||
| 82 | 2 | posix_kill($pid, 9); |
|
| 83 | } |
||
| 84 | } |
||
| 85 | 2 | unlink($filename); |
|
| 86 | } |
||
| 89 |