Conditions | 3 |
Paths | 3 |
Total Lines | 21 |
Code Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Tests | 14 |
CRAP Score | 3.0026 |
Changes | 0 |
1 | <?php |
||
61 | 5 | public function moveNext() |
|
62 | { |
||
63 | 5 | if (!$this->hasNext()) { |
|
64 | return null; |
||
65 | } |
||
66 | |||
67 | 5 | $key = $this->keys[$this->currentRow]; |
|
68 | 5 | $cols = $this->rows[$key]; |
|
69 | |||
70 | 5 | $any = new AnyDataset(); |
|
71 | 5 | $any->appendRow(); |
|
72 | 5 | $any->addField("__id", $this->currentRow); |
|
73 | 5 | $any->addField("__key", $key); |
|
74 | 5 | foreach ($cols as $key => $value) { |
|
75 | 5 | $any->addField(strtolower($key), $value); |
|
76 | } |
||
77 | 5 | $iterator = $any->getIterator(null); |
|
78 | 5 | $singleRow = $iterator->moveNext(); |
|
79 | 5 | $this->currentRow++; |
|
80 | 5 | return $singleRow; |
|
81 | } |
||
82 | |||
88 |