From 639f1e8b3e95defa481c9710af2e55f4a32af330 Mon Sep 17 00:00:00 2001 From: ghost Date: Sat, 27 Jan 2024 10:41:04 +0200 Subject: [PATCH] allow mixed key data types --- src/Memory.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Memory.php b/src/Memory.php index 83817be..3c95087 100644 --- a/src/Memory.php +++ b/src/Memory.php @@ -19,7 +19,7 @@ class Memory { $this->_timeout = $timeout; } - public function get(string $key) : mixed + public function get(mixed $key) : mixed { $key = $this->_setKey( [ @@ -31,7 +31,7 @@ class Memory { return $this->_memcached->get($key); } - public function set(string $key, mixed $value = null, int $timeout = null) : bool + public function set(mixed $key, mixed $value = null, int $timeout = null) : bool { $key = $this->_setKey( [ @@ -43,7 +43,7 @@ class Memory { return $this->_memcached->set($key, $value, ($timeout ? $timeout : $this->_timeout)); } - public function delete(string $key) : bool + public function delete(mixed $key) : bool { $key = $this->_setKey( [ @@ -55,7 +55,7 @@ class Memory { return $this->_memcached->delete($key); } - public function getByValueCallback(string $key, mixed $value = null, int $timeout = null) : mixed + public function getByValueCallback(mixed $key, mixed $value = null, int $timeout = null) : mixed { $key = $this->_setKey( [