Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
29 | protected function getConfig() |
||
30 | { |
||
31 | $cnf = config('push'); |
||
32 | $config = $cnf['connections'][$cnf['default']]; |
||
33 | $keys = ['key', 'token']; |
||
34 | |||
35 | foreach ($keys as $key) { |
||
36 | if (!array_key_exists($key, $config)) { |
||
37 | throw new InvalidArgumentException("Missing configuration key [$key]."); |
||
38 | } |
||
39 | } |
||
40 | |||
41 | return array_only($config, $keys); |
||
42 | } |
||
43 | |||
58 | } |