Conditions | 5 |
Paths | 5 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 5 |
Changes | 0 |
1 | <?php |
||
62 | 2 | private function stopInstances($file) { |
|
63 | 2 | if (file_exists($file)) { |
|
64 | 2 | $content = explode(PHP_EOL, file_get_contents($file)); |
|
65 | |||
66 | 2 | if (count($content)) { |
|
67 | 2 | foreach ($content as $pid) { |
|
68 | 2 | $pid = (int) trim($pid); |
|
69 | |||
70 | 2 | if ($pid > 0) { |
|
71 | 2 | exec('kill ' . $pid); |
|
72 | } |
||
73 | } |
||
74 | |||
75 | 2 | exec('rm ' . $file); |
|
76 | } |
||
81 | } |