qqq
This commit is contained in:
+2
-2
@@ -931,9 +931,9 @@ if (!function_exists('config')) {
|
|||||||
/**
|
/**
|
||||||
* @param $key
|
* @param $key
|
||||||
* @param null $default
|
* @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);
|
return make(ConfigProvider::class)->get($key, $default);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ class ConfigProvider
|
|||||||
{
|
{
|
||||||
$keys = explode($key, '.');
|
$keys = explode($key, '.');
|
||||||
|
|
||||||
$hashMap = $this->hashMap->get(array_unshift($keys));
|
$hashMap = $this->hashMap->get(array_shift($keys));
|
||||||
if (is_null($hashMap)) {
|
if (is_null($hashMap)) {
|
||||||
return $default;
|
return $default;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,8 +58,6 @@ class Redis extends Component
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return void
|
* @return void
|
||||||
* @throws ContainerExceptionInterface
|
|
||||||
* @throws NotFoundExceptionInterface
|
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function init(): void
|
public function init(): void
|
||||||
|
|||||||
Reference in New Issue
Block a user