Conditions | 4 |
Paths | 3 |
Total Lines | 17 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 20 |
Changes | 0 |
1 | <?php |
||
30 | public function read() |
||
31 | { |
||
32 | $resource = fopen($this->filepath, 'r'); |
||
33 | $states = []; |
||
34 | $skipFirst = true; |
||
35 | |||
36 | while (!feof($resource)) { |
||
37 | $state = $this->readLine($resource); |
||
38 | if ($state->isState() && !$skipFirst) { |
||
39 | $states[] = $state; |
||
40 | } |
||
41 | $skipFirst = false; |
||
42 | } |
||
43 | |||
44 | $this->states = new \ArrayIterator($states); |
||
45 | $this->rewind(); |
||
46 | } |
||
47 | |||
85 |