Skip to content

Commit

Permalink
qa: remove dead code
Browse files Browse the repository at this point in the history
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
  • Loading branch information
boesing committed Mar 2, 2024
1 parent b0ede8c commit 5f31f26
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions src/Pattern/ObjectCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);
}
}

0 comments on commit 5f31f26

Please sign in to comment.