From 5f31f26db01cd1e32b54a19a3ce42da725f01488 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20B=C3=B6sing?= <2189546+boesing@users.noreply.github.com> Date: Sat, 2 Mar 2024 22:26:29 +0100 Subject: [PATCH] qa: remove dead code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com> --- src/Pattern/ObjectCache.php | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/src/Pattern/ObjectCache.php b/src/Pattern/ObjectCache.php index 9934bf5f..e24c4311 100644 --- a/src/Pattern/ObjectCache.php +++ b/src/Pattern/ObjectCache.php @@ -4,20 +4,16 @@ use Laminas\Cache\Exception; use Laminas\Cache\Storage\StorageInterface; -use Laminas\Stdlib\ErrorHandler; use Stringable; use Throwable; use function array_shift; use function array_unshift; -use function array_values; use function assert; use function func_get_args; use function in_array; -use function md5; use function method_exists; use function property_exists; -use function serialize; use function sprintf; use function strtolower; @@ -288,30 +284,4 @@ public function __invoke(): mixed { return $this->call('__invoke', func_get_args()); } - - private function generateArgumentsKey(array $args): string - { - if ($args === []) { - return ''; - } - - ErrorHandler::start(); - try { - $serializedArgs = serialize(array_values($args)); - } catch (\Exception $e) { - ErrorHandler::stop(); - throw new Exception\RuntimeException("Can't serialize arguments: see previous exception", 0, $e); - } - $error = ErrorHandler::stop(); - - if (! $serializedArgs) { - throw new Exception\RuntimeException( - sprintf('Cannot serialize arguments%s', $error ? ': ' . $error->getMessage() : ''), - 0, - $error - ); - } - - return md5($serializedArgs); - } }