Total Complexity | 13 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class PathResolver |
||
9 | { |
||
10 | /** |
||
11 | * @param string $path |
||
12 | * @return string|null |
||
13 | */ |
||
14 | public static function resolve(string $path):?string |
||
22 | } |
||
23 | |||
24 | /** |
||
25 | * @param string $basepath |
||
26 | * @return string|null |
||
27 | */ |
||
28 | protected static function resolveYaml(string $basepath):?string |
||
29 | { |
||
30 | if (file_exists($conf = $basepath.'.yml') || file_exists($conf = $basepath.'.yaml')) { |
||
31 | if (function_exists('yaml_parse') || class_exists('Spyc') || class_exists('Symfony\Component\Yaml\Yaml')) { |
||
32 | return $conf; |
||
33 | } |
||
34 | } |
||
35 | return null; |
||
36 | } |
||
37 | |||
38 | protected static function resolveExtensions(string $basepath, array $extensions):?string |
||
47 | } |
||
48 | } |
||
49 |