@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | * |
| 44 | 44 | * @param string|array $_ List of files. |
| 45 | 45 | * |
| 46 | - * @return ConfigInterface Instance of a ConfigInterface implementation. |
|
| 46 | + * @return Config|null Instance of a ConfigInterface implementation. |
|
| 47 | 47 | */ |
| 48 | 48 | public static function createFromFile($_) |
| 49 | 49 | { |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | * |
| 88 | 88 | * @param array $array Array with configuration values. |
| 89 | 89 | * |
| 90 | - * @return ConfigInterface Instance of a ConfigInterface implementation. |
|
| 90 | + * @return Config|null Instance of a ConfigInterface implementation. |
|
| 91 | 91 | */ |
| 92 | 92 | public static function createFromArray(array $array) |
| 93 | 93 | { |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | * |
| 110 | 110 | * @param mixed $_ Array with configuration values. |
| 111 | 111 | * |
| 112 | - * @return ConfigInterface Instance of a ConfigInterface implementation. |
|
| 112 | + * @return Config|null Instance of a ConfigInterface implementation. |
|
| 113 | 113 | */ |
| 114 | 114 | public static function create($_) |
| 115 | 115 | { |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | * @since 0.4.4 |
| 133 | 133 | * |
| 134 | 134 | * @param string $identifier Identifier to look for in the cache. |
| 135 | - * @param mixed $fallback Fallback to use to fill the cache. If $fallback is a callable, it will be executed |
|
| 135 | + * @param \Closure $fallback Fallback to use to fill the cache. If $fallback is a callable, it will be executed |
|
| 136 | 136 | * with $identifier as an argument. |
| 137 | 137 | * |
| 138 | 138 | * @return mixed The latest content of the cache for the given identifier. |
@@ -57,12 +57,12 @@ discard block |
||
| 57 | 57 | try { |
| 58 | 58 | $file = array_pop($files); |
| 59 | 59 | |
| 60 | - if (! is_readable($file)) { |
|
| 60 | + if ( ! is_readable($file)) { |
|
| 61 | 61 | continue; |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | $config = static::createFromArray( |
| 65 | - static::getFromCache($file, function ($file) { |
|
| 65 | + static::getFromCache($file, function($file) { |
|
| 66 | 66 | return Loader::load($file); |
| 67 | 67 | }) |
| 68 | 68 | ); |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | */ |
| 140 | 140 | protected static function getFromCache($identifier, $fallback) |
| 141 | 141 | { |
| 142 | - if (! array_key_exists($identifier, static::$configFilesCache)) { |
|
| 142 | + if ( ! array_key_exists($identifier, static::$configFilesCache)) { |
|
| 143 | 143 | static::$configFilesCache[$identifier] = is_callable($fallback) |
| 144 | 144 | ? $fallback($identifier) |
| 145 | 145 | : $fallback; |