Conditions | 4 |
Paths | 4 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | public function getCalculatedAnswer(): array |
||
19 | { |
||
20 | $rows = DB::query('SHOW TABLE STATUS;'); |
||
21 | $allowedKeys = $this->Config()->get('fields_required'); |
||
22 | $array = $rows; |
||
23 | foreach ($array as $pos => $row) { |
||
24 | foreach (array_keys($row) as $key) { |
||
25 | if (! in_array($key, $allowedKeys, true)) { |
||
26 | unset($array[$pos][$key]); |
||
27 | } |
||
28 | } |
||
29 | } |
||
30 | return $array; |
||
31 | } |
||
33 |