Conditions | 3 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 3.2098 |
Changes | 4 | ||
Bugs | 2 | Features | 2 |
1 | <?php |
||
21 | 90 | private function buildConfig(array $config = []) |
|
22 | { |
||
23 | // Merge our config with user config |
||
24 | 90 | $result = array_replace_recursive((include realpath(__DIR__.'/../../config/quran.php')), $config); |
|
25 | |||
26 | // If function storage_path is exist (laravel), we update the path to laravel's storage path |
||
27 | 90 | if (function_exists('storage_path') && php_sapi_name() !== 'cli') { |
|
28 | $result['storage_path'] = storage_path('app/' . $result['storage_path']); |
||
29 | } else { |
||
30 | 90 | $result['storage_path'] = realpath(__DIR__ . '/../..') . '/' . $result['storage_path']; |
|
31 | } |
||
32 | |||
33 | 90 | return $result; |
|
34 | } |
||
35 | |||
65 |