Conditions | 3 |
Paths | 2 |
Total Lines | 7 |
Code Lines | 3 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
22 | public function write(int $masterPid, int $managerPid): void |
||
23 | { |
||
24 | if (! is_writable($this->pidFile) && ! is_writable(dirname($this->pidFile))) { |
||
25 | throw new \RuntimeException(sprintf('Pid file "%s" is not writable', $this->pidFile)); |
||
26 | } |
||
27 | |||
28 | file_put_contents($this->pidFile, $masterPid . ',' . $managerPid); |
||
29 | } |
||
73 |