| Conditions | 4 |
| Paths | 4 |
| Total Lines | 14 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 4.3731 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 14 | 57 | private function buildConfig(array $config = [], $sapi = "") |
|
| 15 | { |
||
| 16 | 57 | if(strlen($sapi) == 0) $sapi = php_sapi_name(); |
|
| 17 | |||
| 18 | // Merge our config with user config |
||
| 19 | 57 | $result = array_merge((include realpath(__DIR__ . '/../../config/quran.php')), $config); |
|
| 20 | |||
| 21 | // If function storage_path is exist (laravel), we update the path to laravel's storage path |
||
| 22 | 57 | if (function_exists('storage_path') && $sapi !== 'cli') { |
|
| 23 | $result['storage_path'] = storage_path('app' . DIRECTORY_SEPARATOR . $result['storage_path']); |
||
| 24 | } |
||
| 25 | |||
| 26 | 57 | return $result; |
|
| 27 | } |
||
| 28 | |||
| 33 | } |