mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-12-10 17:03:52 +09:00
reinstall dependencies on php 7.4
This commit is contained in:
@@ -28,7 +28,7 @@ use Symfony\Contracts\Service\ResetInterface;
|
||||
class TraceableAdapter implements AdapterInterface, CacheInterface, PruneableInterface, ResettableInterface
|
||||
{
|
||||
protected $pool;
|
||||
private array $calls = [];
|
||||
private $calls = [];
|
||||
|
||||
public function __construct(AdapterInterface $pool)
|
||||
{
|
||||
@@ -38,7 +38,7 @@ class TraceableAdapter implements AdapterInterface, CacheInterface, PruneableInt
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function get(string $key, callable $callback, float $beta = null, array &$metadata = null): mixed
|
||||
public function get(string $key, callable $callback, float $beta = null, array &$metadata = null)
|
||||
{
|
||||
if (!$this->pool instanceof CacheInterface) {
|
||||
throw new \BadMethodCallException(sprintf('Cannot call "%s::get()": this class doesn\'t implement "%s".', get_debug_type($this->pool), CacheInterface::class));
|
||||
@@ -70,7 +70,7 @@ class TraceableAdapter implements AdapterInterface, CacheInterface, PruneableInt
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getItem(mixed $key): CacheItem
|
||||
public function getItem($key)
|
||||
{
|
||||
$event = $this->start(__FUNCTION__);
|
||||
try {
|
||||
@@ -89,8 +89,10 @@ class TraceableAdapter implements AdapterInterface, CacheInterface, PruneableInt
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function hasItem(mixed $key): bool
|
||||
public function hasItem($key)
|
||||
{
|
||||
$event = $this->start(__FUNCTION__);
|
||||
try {
|
||||
@@ -102,8 +104,10 @@ class TraceableAdapter implements AdapterInterface, CacheInterface, PruneableInt
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function deleteItem(mixed $key): bool
|
||||
public function deleteItem($key)
|
||||
{
|
||||
$event = $this->start(__FUNCTION__);
|
||||
try {
|
||||
@@ -115,8 +119,10 @@ class TraceableAdapter implements AdapterInterface, CacheInterface, PruneableInt
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function save(CacheItemInterface $item): bool
|
||||
public function save(CacheItemInterface $item)
|
||||
{
|
||||
$event = $this->start(__FUNCTION__);
|
||||
try {
|
||||
@@ -128,8 +134,10 @@ class TraceableAdapter implements AdapterInterface, CacheInterface, PruneableInt
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function saveDeferred(CacheItemInterface $item): bool
|
||||
public function saveDeferred(CacheItemInterface $item)
|
||||
{
|
||||
$event = $this->start(__FUNCTION__);
|
||||
try {
|
||||
@@ -142,7 +150,7 @@ class TraceableAdapter implements AdapterInterface, CacheInterface, PruneableInt
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getItems(array $keys = []): iterable
|
||||
public function getItems(array $keys = [])
|
||||
{
|
||||
$event = $this->start(__FUNCTION__);
|
||||
try {
|
||||
@@ -167,8 +175,10 @@ class TraceableAdapter implements AdapterInterface, CacheInterface, PruneableInt
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function clear(string $prefix = ''): bool
|
||||
public function clear(string $prefix = '')
|
||||
{
|
||||
$event = $this->start(__FUNCTION__);
|
||||
try {
|
||||
@@ -184,8 +194,10 @@ class TraceableAdapter implements AdapterInterface, CacheInterface, PruneableInt
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function deleteItems(array $keys): bool
|
||||
public function deleteItems(array $keys)
|
||||
{
|
||||
$event = $this->start(__FUNCTION__);
|
||||
$event->result['keys'] = $keys;
|
||||
@@ -198,8 +210,10 @@ class TraceableAdapter implements AdapterInterface, CacheInterface, PruneableInt
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function commit(): bool
|
||||
public function commit()
|
||||
{
|
||||
$event = $this->start(__FUNCTION__);
|
||||
try {
|
||||
@@ -212,7 +226,7 @@ class TraceableAdapter implements AdapterInterface, CacheInterface, PruneableInt
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function prune(): bool
|
||||
public function prune()
|
||||
{
|
||||
if (!$this->pool instanceof PruneableInterface) {
|
||||
return false;
|
||||
@@ -270,15 +284,12 @@ class TraceableAdapter implements AdapterInterface, CacheInterface, PruneableInt
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
class TraceableAdapterEvent
|
||||
{
|
||||
public string $name;
|
||||
public float $start;
|
||||
public float $end;
|
||||
public array|bool $result;
|
||||
public int $hits = 0;
|
||||
public int $misses = 0;
|
||||
public $name;
|
||||
public $start;
|
||||
public $end;
|
||||
public $result;
|
||||
public $hits = 0;
|
||||
public $misses = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user