| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 78 | 3 | public function rewind() |
|
| 79 | { |
||
| 80 | 3 | if (!$this->iterableResult) { |
|
| 81 | 3 | $this->iterableResult = new \SimpleXMLIterator(file_get_contents($this->filename)); |
|
| 82 | |||
| 83 | 3 | if ($this->xpath) { |
|
|
|
|||
| 84 | 1 | $this->iterableResult = new \ArrayIterator($this->iterableResult->xpath($this->xpath)); |
|
| 85 | } |
||
| 86 | } |
||
| 87 | |||
| 88 | 3 | $this->iterableResult->rewind(); |
|
| 89 | 3 | } |
|
| 90 | |||
| 103 |
In PHP, under loose comparison (like
==, or!=, orswitchconditions), values of different types might be equal.For
stringvalues, the empty string''is a special case, in particular the following results might be unexpected: