| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3.0987 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 34 | 28 | protected function refineData(array $data) |
|
| 35 | { |
||
| 36 | 28 | $this->length = count($data); |
|
| 37 | 28 | if (1 === $this->length) { |
|
| 38 | 28 | $this->oneElement = true; |
|
| 39 | 28 | return reset($data); |
|
| 40 | } |
||
| 41 | 21 | if (0 === $this->length) { |
|
| 42 | $this->oneElement = true; |
||
| 43 | return null; |
||
| 44 | } |
||
| 45 | 21 | return $data; |
|
| 46 | } |
||
| 70 |