| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 2.032 |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | 9 | protected function config($string, $default = null) |
|
| 17 | { |
||
| 18 | 9 | if (is_null(config($config = Constants::CONFIG_PACKAGE_NAME))) { |
|
| 19 | throw new \Exception("Config ({$config}.php) not found. Have you published it?"); |
||
| 20 | } |
||
| 21 | |||
| 22 | 9 | return config( |
|
| 23 | 9 | implode('.', [Constants::CONFIG_PACKAGE_NAME, $string]), |
|
| 24 | $default |
||
| 25 | ); |
||
| 26 | } |
||
| 27 | } |
||
| 28 |