Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
10 | function menu_path(string $path = ''): string |
||
11 | { |
||
12 | 49 | $app = Container::getInstance(); |
|
13 | |||
14 | 49 | $config = $app->make(ConfigRepository::class); |
|
15 | |||
16 | 49 | $menusDir = $config->get('ussd.menu-path'); |
|
17 | |||
18 | 49 | $path = $path ? DIRECTORY_SEPARATOR.ltrim($path, DIRECTORY_SEPARATOR) : $path; |
|
19 | |||
20 | 49 | return $app->basePath($menusDir.$path); |
|
|
|||
21 | } |
||
23 |