| Conditions | 4 |
| Paths | 14 |
| Total Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 4.0218 |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | 4 | public function check(array $config): bool |
|
| 30 | { |
||
| 31 | try { |
||
| 32 | 4 | if (Arr::get($config, 'default_connection', true)) { |
|
| 33 | 4 | DB::connection()->getPdo(); |
|
| 34 | } |
||
| 35 | |||
| 36 | 4 | foreach (Arr::get($config, 'connections', []) as $connection) { |
|
| 37 | DB::connection($connection)->getPdo(); |
||
| 38 | } |
||
| 39 | |||
| 40 | 4 | return true; |
|
| 41 | 4 | } catch (\Exception $e) { |
|
| 42 | 4 | $this->message = $e->getMessage(); |
|
| 43 | } |
||
| 44 | 4 | return false; |
|
| 45 | } |
||
| 46 | |||
| 60 |