class_exists(InvalidArgumentException::
class);
/**
* An implementation of CacheInterface for PSR-6 CacheItemPoolInterface classes.
*
* @author Nicolas Grekas <p@tchwork.com>
*/
trait CacheTrait
{ public function get(string
$key, callable
$callback, float
$beta = null, array &
$metadata = null
): mixed
{ return $this->
doGet($this,
$key,
$callback,
$beta,
$metadata);
} public function delete(string
$key): bool
{ return $this->
deleteItem($key);
} private function doGet(CacheItemPoolInterface
$pool, string
$key, callable
$callback, ?float
$beta, array &
$metadata = null, LoggerInterface
$logger = null
): mixed
{ if (0 >
$beta ??= 1.0
) { throw new class(sprintf('Argument "$beta" provided to "%s::get()" must be a positive number, %f given.',
static::
class,
$beta)) extends \InvalidArgumentException
implements InvalidArgumentException
{};
}