Conditions | 3 |
Paths | 5 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
19 | public function call() |
||
20 | { |
||
21 | $builder = $this->getBuilder(); |
||
22 | |||
23 | try { |
||
24 | DB::connection()->getPdo(); |
||
25 | if (! DB::connection()->getDatabaseName()) { |
||
26 | $builder->down()->withData("error", "Could not find the database."); |
||
27 | } |
||
28 | } catch (\Exception $e) { |
||
29 | $builder->down()->withData("error", "Could not open connection to database server."); |
||
30 | } |
||
31 | |||
32 | return $builder->build(); |
||
33 | } |
||
35 |