Conditions | 2 |
Paths | 4 |
Total Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
14 | function credentials(string $key, $default = null) |
||
15 | { |
||
16 | $filename = config('credentials.file'); |
||
17 | try { |
||
18 | $credentials = app(Credentials::class); |
||
19 | $credentials->load($filename); |
||
20 | |||
21 | return $credentials->get($key, $default); |
||
22 | |||
23 | } catch (ReflectionException | BindingResolutionException $e) { |
||
24 | |||
25 | return Credentials::CONFIG_PREFIX . $key; |
||
26 | |||
27 | } |
||
28 | |||
29 | } |
||
30 | } |
||
31 |