mirror of
https://github.com/itflow-org/itflow
synced 2026-08-24 00:15:12 +00:00
Allow PHP-8.2 and up Compatibility instead of just PHP-8.4
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
namespace Illuminate\Support\Facades;
|
||||
|
||||
use Mockery;
|
||||
|
||||
/**
|
||||
* @method static \Illuminate\Contracts\Cache\Repository store(string|null $name = null)
|
||||
* @method static \Illuminate\Contracts\Cache\Repository driver(string|null $driver = null)
|
||||
@@ -16,26 +18,33 @@ namespace Illuminate\Support\Facades;
|
||||
* @method static void purge(string|null $name = null)
|
||||
* @method static \Illuminate\Cache\CacheManager extend(string $driver, \Closure $callback)
|
||||
* @method static \Illuminate\Cache\CacheManager setApplication(\Illuminate\Contracts\Foundation\Application $app)
|
||||
* @method static bool has(array|string $key)
|
||||
* @method static bool missing(string $key)
|
||||
* @method static mixed get(array|string $key, mixed $default = null)
|
||||
* @method static bool has(\UnitEnum|array|string $key)
|
||||
* @method static bool missing(\UnitEnum|string $key)
|
||||
* @method static mixed get(\UnitEnum|array|string $key, mixed $default = null)
|
||||
* @method static array many(array $keys)
|
||||
* @method static iterable getMultiple(iterable $keys, mixed $default = null)
|
||||
* @method static mixed pull(array|string $key, mixed $default = null)
|
||||
* @method static bool put(array|string $key, mixed $value, \DateTimeInterface|\DateInterval|int|null $ttl = null)
|
||||
* @method static bool set(string $key, mixed $value, null|int|\DateInterval $ttl = null)
|
||||
* @method static mixed pull(\UnitEnum|array|string $key, mixed $default = null)
|
||||
* @method static string string(\UnitEnum|string $key, \Closure|string|null $default = null)
|
||||
* @method static int integer(\UnitEnum|string $key, \Closure|int|null $default = null)
|
||||
* @method static float float(\UnitEnum|string $key, \Closure|float|null $default = null)
|
||||
* @method static bool boolean(\UnitEnum|string $key, \Closure|bool|null $default = null)
|
||||
* @method static array array(\UnitEnum|string $key, \Closure|array|null $default = null)
|
||||
* @method static bool put(\UnitEnum|array|string $key, mixed $value, \DateTimeInterface|\DateInterval|int|null $ttl = null)
|
||||
* @method static bool set(\UnitEnum|array|string $key, mixed $value, \DateTimeInterface|\DateInterval|int|null $ttl = null)
|
||||
* @method static bool putMany(array $values, \DateTimeInterface|\DateInterval|int|null $ttl = null)
|
||||
* @method static bool setMultiple(iterable $values, null|int|\DateInterval $ttl = null)
|
||||
* @method static bool add(string $key, mixed $value, \DateTimeInterface|\DateInterval|int|null $ttl = null)
|
||||
* @method static int|bool increment(string $key, mixed $value = 1)
|
||||
* @method static int|bool decrement(string $key, mixed $value = 1)
|
||||
* @method static bool forever(string $key, mixed $value)
|
||||
* @method static mixed remember(string $key, \Closure|\DateTimeInterface|\DateInterval|int|null $ttl, \Closure $callback)
|
||||
* @method static mixed sear(string $key, \Closure $callback)
|
||||
* @method static mixed rememberForever(string $key, \Closure $callback)
|
||||
* @method static mixed flexible(string $key, array $ttl, callable $callback, array|null $lock = null, bool $alwaysDefer = false)
|
||||
* @method static bool forget(string $key)
|
||||
* @method static bool delete(string $key)
|
||||
* @method static bool add(\UnitEnum|array|string $key, mixed $value, \DateTimeInterface|\DateInterval|int|null $ttl = null)
|
||||
* @method static int|bool increment(\UnitEnum|string $key, mixed $value = 1)
|
||||
* @method static int|bool decrement(\UnitEnum|string $key, mixed $value = 1)
|
||||
* @method static bool forever(\UnitEnum|string $key, mixed $value)
|
||||
* @method static mixed remember(\UnitEnum|string $key, \Closure|\DateTimeInterface|\DateInterval|int|null $ttl, \Closure $callback)
|
||||
* @method static mixed sear(\UnitEnum|string $key, \Closure $callback)
|
||||
* @method static mixed rememberForever(\UnitEnum|string $key, \Closure $callback)
|
||||
* @method static mixed flexible(\UnitEnum|string $key, array $ttl, callable $callback, array|null $lock = null, bool $alwaysDefer = false)
|
||||
* @method static mixed withoutOverlapping(\UnitEnum|string $key, callable $callback, int $lockFor = 0, int $waitFor = 10, string|null $owner = null)
|
||||
* @method static \Illuminate\Cache\Limiters\ConcurrencyLimiterBuilder funnel(\UnitEnum|string $name)
|
||||
* @method static bool forget(\UnitEnum|array|string $key)
|
||||
* @method static bool delete(\UnitEnum|array|string $key)
|
||||
* @method static bool deleteMultiple(iterable $keys)
|
||||
* @method static bool clear()
|
||||
* @method static \Illuminate\Cache\TaggedCache tags(mixed $names)
|
||||
@@ -71,4 +80,27 @@ class Cache extends Facade
|
||||
{
|
||||
return 'cache';
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the facade into a Mockery spy.
|
||||
*
|
||||
* @return \Mockery\MockInterface
|
||||
*/
|
||||
public static function spy()
|
||||
{
|
||||
if (! static::isMock()) {
|
||||
$class = static::getMockableClass();
|
||||
$instance = static::getFacadeRoot();
|
||||
|
||||
if ($class && $instance) {
|
||||
return tap(Mockery::spy($instance)->makePartial(), function ($spy) {
|
||||
static::swap($spy);
|
||||
});
|
||||
}
|
||||
|
||||
return tap($class ? Mockery::spy($class) : Mockery::spy(), function ($spy) {
|
||||
static::swap($spy);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user