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