fix(cache): Implicitly marking parameter $name as nullable is deprecated (#1877)

This commit is contained in:
Roman Kelesidis 2025-04-10 16:19:22 +07:00 committed by GitHub
commit c3b40003b7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 4 additions and 4 deletions

View file

@ -116,7 +116,7 @@ class APCu extends Common
* @param string|null $name
* @return bool
*/
public function rm(string $name = null): bool
public function rm(?string $name = null): bool
{
$targetMethod = is_string($name) ? 'delete' : 'flush';
$name = is_string($name) ? $this->prefix . $name : null;

View file

@ -172,7 +172,7 @@ class Memcached extends Common
* @param string|null $name
* @return bool
*/
public function rm(string $name = null): bool
public function rm(?string $name = null): bool
{
if (!$this->connected) {
$this->connect();

View file

@ -174,7 +174,7 @@ class Redis extends Common
* @param string|null $name
* @return bool
*/
public function rm(string $name = null): bool
public function rm(?string $name = null): bool
{
if (!$this->connected) {
$this->connect();

View file

@ -126,7 +126,7 @@ class Sqlite extends Common
* @param string|null $name
* @return bool
*/
public function rm(string $name = null): bool
public function rm(?string $name = null): bool
{
$targetMethod = is_string($name) ? 'delete' : 'flush';
$name = is_string($name) ? $this->prefix . $name : null;