This commit is contained in:
xl
2023-05-26 10:26:13 +08:00
parent a1c0da9688
commit fff3211e61
3 changed files with 8 additions and 10 deletions
+2 -2
View File
@@ -931,9 +931,9 @@ if (!function_exists('config')) {
/**
* @param $key
* @param null $default
* @return array|string|null
* @return array|string|int|float|bool|null
*/
function config($key, $default = NULL): null|array|string
function config($key, $default = NULL): null|array|string|int|float|bool
{
return make(ConfigProvider::class)->get($key, $default);
}
+1 -1
View File
@@ -31,7 +31,7 @@ class ConfigProvider
{
$keys = explode($key, '.');
$hashMap = $this->hashMap->get(array_unshift($keys));
$hashMap = $this->hashMap->get(array_shift($keys));
if (is_null($hashMap)) {
return $default;
}
-2
View File
@@ -58,8 +58,6 @@ class Redis extends Component
/**
* @return void
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
* @throws Exception
*/
public function init(): void