| Conditions | 3 |
| Paths | 5 |
| Total Lines | 21 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | public function getCalculatedAnswer(): string |
||
| 15 | { |
||
| 16 | if ($this->Config()->get('include_dev_build')) { |
||
| 17 | $db = new DatabaseAdmin(); |
||
| 18 | $start = microtime(true); |
||
| 19 | $answer = ''; |
||
| 20 | try { |
||
| 21 | $db->doBuild(true, false, false); |
||
| 22 | $end = microtime(true) - $start; |
||
| 23 | |||
| 24 | $answer = sprintf( |
||
| 25 | 'Completed in %s seconds', |
||
| 26 | round($end, 2) |
||
| 27 | ); |
||
| 28 | } catch (Exception $exception) { |
||
| 29 | $answer = 'Error retrieving data: ' . $exception->getMessage(); |
||
| 30 | } |
||
| 31 | |||
| 32 | return $answer; |
||
| 33 | } |
||
| 34 | return ' |
||
| 35 | Feature not enabled on host. |
||
| 40 |