| Conditions | 4 |
| Paths | 8 |
| Total Lines | 23 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 16 |
| CRAP Score | 4 |
| Changes | 2 | ||
| Bugs | 0 | Features | 2 |
| 1 | <?php |
||
| 45 | 1 | public function getData() |
|
| 46 | { |
||
| 47 | 1 | $data = array(); |
|
| 48 | 1 | foreach ($this->dataset as $entry) { |
|
| 49 | 1 | $data[] = $entry->toArray(); |
|
| 50 | 1 | } |
|
| 51 | |||
| 52 | 1 | $result = array(); |
|
| 53 | |||
| 54 | 1 | $type = $this->getType(); |
|
| 55 | 1 | if ($type) { |
|
| 56 | 1 | $result['type'] = 'reverse'; |
|
| 57 | 1 | } |
|
| 58 | |||
| 59 | 1 | $show = $this->getShowPercentage(); |
|
| 60 | 1 | if (!$show) { |
|
| 61 | 1 | $result['percentage'] = 'hide'; |
|
| 62 | 1 | } |
|
| 63 | |||
| 64 | 1 | $result['item'] = $data; |
|
| 65 | |||
| 66 | 1 | return $result; |
|
| 67 | } |
||
| 68 | } |
||
| 69 |