| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 39 | public function getTableData(string $tableName, bool $sort = false) |
||
| 40 | { |
||
| 41 | if (array_key_exists($tableName, $this->dataSource)) { |
||
| 42 | if ($sort) { |
||
| 43 | return $this->sortData($this->dataSource[$tableName]); |
||
| 44 | } else { |
||
| 45 | return $this->dataSource[$tableName]; |
||
| 46 | } |
||
| 47 | } else { |
||
| 48 | throw new \Exception(sprintf( |
||
| 49 | 'Table "%s" does not exists', |
||
| 50 | $tableName |
||
| 51 | )); |
||
| 74 |