mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 22:03:49 -07:00
fix(cache): Implicitly marking parameter $name
as nullable is deprecated (#1877)
This commit is contained in:
parent
1dc84f666f
commit
c3b40003b7
4 changed files with 4 additions and 4 deletions
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue