@@ -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 | { |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | * |
| 136 | 136 | * @param mixed $_ Array with configuration values. |
| 137 | 137 | * |
| 138 | - * @return ConfigInterface Instance of a ConfigInterface implementation. |
|
| 138 | + * @return Config|null Instance of a ConfigInterface implementation. |
|
| 139 | 139 | */ |
| 140 | 140 | public static function merge($_) |
| 141 | 141 | { |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | * |
| 163 | 163 | * @param string|array $_ List of files. |
| 164 | 164 | * |
| 165 | - * @return ConfigInterface Instance of a ConfigInterface implementation. |
|
| 165 | + * @return Config|null Instance of a ConfigInterface implementation. |
|
| 166 | 166 | */ |
| 167 | 167 | public static function mergeFromFiles($_) |
| 168 | 168 | { |
@@ -231,7 +231,7 @@ discard block |
||
| 231 | 231 | * @since 0.4.4 |
| 232 | 232 | * |
| 233 | 233 | * @param string $identifier Identifier to look for in the cache. |
| 234 | - * @param mixed $fallback Fallback to use to fill the cache. If $fallback is a callable, it will be executed |
|
| 234 | + * @param \Closure $fallback Fallback to use to fill the cache. If $fallback is a callable, it will be executed |
|
| 235 | 235 | * with $identifier as an argument. |
| 236 | 236 | * |
| 237 | 237 | * @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 | ); |
@@ -177,11 +177,11 @@ discard block |
||
| 177 | 177 | try { |
| 178 | 178 | $file = array_pop($files); |
| 179 | 179 | |
| 180 | - if (! is_readable($file)) { |
|
| 180 | + if ( ! is_readable($file)) { |
|
| 181 | 181 | continue; |
| 182 | 182 | } |
| 183 | 183 | |
| 184 | - $new_data = static::getFromCache($file, function ($file) { |
|
| 184 | + $new_data = static::getFromCache($file, function($file) { |
|
| 185 | 185 | return Loader::load($file); |
| 186 | 186 | }); |
| 187 | 187 | |
@@ -238,7 +238,7 @@ discard block |
||
| 238 | 238 | */ |
| 239 | 239 | protected static function getFromCache($identifier, $fallback) |
| 240 | 240 | { |
| 241 | - if (! array_key_exists($identifier, static::$configFilesCache)) { |
|
| 241 | + if ( ! array_key_exists($identifier, static::$configFilesCache)) { |
|
| 242 | 242 | static::$configFilesCache[$identifier] = is_callable($fallback) |
| 243 | 243 | ? $fallback($identifier) |
| 244 | 244 | : $fallback; |