Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/CacheManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ public function getDefaultDriver(): ?string
* @param mixed|null $default 默认值
* @return mixed
*/
public function getConfig(string $name = null, mixed $default = null): mixed
public function getConfig(string $name = '', mixed $default = null): mixed
{
if (!is_null($name)) {
if ($name) {
return config("think-cache.$name", $default);
}

Expand All @@ -63,10 +63,10 @@ public function getConfig(string $name = null, mixed $default = null): mixed
* @param mixed|null $default
* @return mixed
*/
public function getStoreConfig(string $store, string $name = null, mixed $default = null): mixed
public function getStoreConfig(string $store, string $name = '', mixed $default = null): mixed
{
if ($config = $this->getConfig("stores.{$store}")) {
return Arr::get($config, $name, $default);
return $name ? Arr::get($config, $name, $default) : $config;
}

throw new \InvalidArgumentException("Store [$store] not found.");
Expand Down Expand Up @@ -97,7 +97,7 @@ protected function resolveConfig(string $name): mixed
* @return Driver
* @throws ReflectionException
*/
public function store(string $name = null): Driver
public function store(string $name = ''): Driver
{
return $this->driver($name);
}
Expand Down
Loading