qqq
This commit is contained in:
+6
-6
@@ -928,12 +928,12 @@ if (!function_exists('env')) {
|
||||
|
||||
if (!function_exists('config')) {
|
||||
|
||||
/**
|
||||
* @param $key
|
||||
* @param null $default
|
||||
* @return array|string|null
|
||||
*/
|
||||
function config($key, $default = NULL): null|array|string
|
||||
/**
|
||||
* @param $key
|
||||
* @param null $default
|
||||
* @return array|string|int|float|bool|null
|
||||
*/
|
||||
function config($key, $default = NULL): null|array|string|int|float|bool
|
||||
{
|
||||
return make(ConfigProvider::class)->get($key, $default);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -58,9 +58,7 @@ class Redis extends Component
|
||||
|
||||
/**
|
||||
* @return void
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
* @throws Exception
|
||||
* @throws Exception
|
||||
*/
|
||||
public function init(): void
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user