Conditions | 3 |
Paths | 4 |
Total Lines | 19 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
51 | 1 | public function rewind() |
|
52 | { |
||
53 | // this iterator can not really rewind. instead it places itself onto the |
||
54 | // first children. |
||
55 | 1 | if ($this->reader->nodeType === XMLReader::NONE) { |
|
56 | 1 | $this->moveToNextElement(); |
|
57 | } |
||
58 | |||
59 | 1 | if ($this->stopDepth === null) { |
|
60 | 1 | $this->stopDepth = $this->reader->depth; |
|
61 | } |
||
62 | |||
63 | // move to first child - if any |
||
64 | 1 | parent::next(); |
|
65 | 1 | parent::rewind(); |
|
66 | |||
67 | 1 | $this->index = 0; |
|
68 | 1 | $this->didRewind = true; |
|
69 | 1 | } |
|
70 | |||
110 |