| Conditions | 2 |
| Paths | 2 |
| Total Lines | 8 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | public static function resolve(string $path):?string |
||
| 11 | { |
||
| 12 | if (file_exists($path)) { |
||
| 13 | return $path; |
||
| 14 | } |
||
| 15 | $basepath = dirname($path).'/'.pathinfo($path, PATHINFO_FILENAME); |
||
| 16 | |||
| 17 | return static::resolveYaml($basepath) ?? static::resolveExtensions($basepath, ['json','php','ini']); |
||
| 18 | } |
||
| 40 |