Total Complexity | 4 |
Total Lines | 62 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | final class StreamWrapper |
||
14 | { |
||
15 | /** |
||
16 | * The name of the stream wrapper. |
||
17 | * |
||
18 | * @var string |
||
19 | */ |
||
20 | public const NAME = 'cerbero-json-parser'; |
||
21 | |||
22 | /** |
||
23 | * The stream context. |
||
24 | * |
||
25 | * @var resource |
||
26 | */ |
||
27 | public mixed $context; |
||
28 | |||
29 | /** |
||
30 | * The PSR-7 stream. |
||
31 | * |
||
32 | * @var StreamInterface |
||
33 | */ |
||
34 | private $stream; |
||
35 | |||
36 | /** |
||
37 | * Open the stream |
||
38 | * |
||
39 | * @param string $path |
||
40 | * @param string $mode |
||
41 | * @param int $options |
||
42 | * @param mixed $opened_path |
||
43 | * @return bool |
||
44 | * |
||
45 | * @scrutinizer ignore-unused |
||
46 | */ |
||
47 | public function stream_open(string $path, string $mode, int $options, &$opened_path): bool |
||
54 | } |
||
55 | |||
56 | /** |
||
57 | * Determine whether the pointer is at the end of the stream |
||
58 | * |
||
59 | * @return bool |
||
60 | */ |
||
61 | public function stream_eof(): bool |
||
64 | } |
||
65 | |||
66 | /** |
||
67 | * Read from the stream |
||
68 | * |
||
69 | * @param int $count |
||
70 | * @return string |
||
71 | */ |
||
72 | public function stream_read(int $count): string |
||
77 |