| Conditions | 1 |
| Paths | 1 |
| Total Lines | 19 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 29 | public function readAll(string $path): string |
||
| 30 | { |
||
| 31 | /** @psalm-suppress InvalidArgument */ |
||
| 32 | $process = proc_open( |
||
| 33 | [ |
||
|
|
|||
| 34 | 'cat', |
||
| 35 | $path |
||
| 36 | ], |
||
| 37 | [ |
||
| 38 | 0 => ['pipe', 'r'], |
||
| 39 | 1 => ['pipe', 'w'], |
||
| 40 | 2 => ['pipe', 'w'], |
||
| 41 | ], |
||
| 42 | $pipes |
||
| 43 | ); |
||
| 44 | $contents = stream_get_contents($pipes[1]); |
||
| 45 | proc_close($process); |
||
| 46 | |||
| 47 | return $contents; |
||
| 48 | } |
||
| 50 |