Total Complexity | 4 |
Total Lines | 27 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
6 | class StringSource implements SourceInterface |
||
7 | { |
||
8 | /** @var string */ |
||
9 | protected $string; |
||
10 | /** @var int */ |
||
11 | protected $position = 0; |
||
12 | |||
13 | 71 | public function __construct(string $string) |
|
16 | 71 | } |
|
17 | |||
18 | 63 | public function isEof(): bool |
|
19 | { |
||
20 | 63 | return $this->position == strlen($this->string); |
|
21 | } |
||
22 | |||
23 | 63 | public function read(int $bytes): string |
|
28 | } |
||
29 | |||
30 | 62 | public function rewind(): void |
|
33 | 62 | } |
|
34 | } |
||
35 |