@@ -11,21 +11,21 @@ discard block |
||
| 11 | 11 | * @param string $path |
| 12 | 12 | * @return string|null |
| 13 | 13 | */ |
| 14 | - public static function resolve(string $path):?string |
|
| 14 | + public static function resolve(string $path): ?string |
|
| 15 | 15 | { |
| 16 | 16 | if (file_exists($path) && is_file($path)) { |
| 17 | 17 | return $path; |
| 18 | 18 | } |
| 19 | 19 | $basepath = dirname($path).'/'.pathinfo($path, PATHINFO_FILENAME); |
| 20 | 20 | |
| 21 | - return static::resolveYaml($basepath) ?? static::resolveExtensions($basepath, ['json','php','ini']); |
|
| 21 | + return static::resolveYaml($basepath) ?? static::resolveExtensions($basepath, ['json', 'php', 'ini']); |
|
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | /** |
| 25 | 25 | * @param string $basepath |
| 26 | 26 | * @return string|null |
| 27 | 27 | */ |
| 28 | - protected static function resolveYaml(string $basepath):?string |
|
| 28 | + protected static function resolveYaml(string $basepath): ?string |
|
| 29 | 29 | { |
| 30 | 30 | if (file_exists($conf = $basepath.'.yml') || file_exists($conf = $basepath.'.yaml')) { |
| 31 | 31 | if (function_exists('yaml_parse') || class_exists('Spyc')) { |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | return null; |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | - protected static function resolveExtensions(string $basepath, array $extensions):?string |
|
| 38 | + protected static function resolveExtensions(string $basepath, array $extensions): ?string |
|
| 39 | 39 | { |
| 40 | 40 | foreach ($extensions as $ext) { |
| 41 | 41 | $conf = $basepath.'.'.$ext; |