diff --git a/Dockerfile b/Dockerfile index 693b8ed0..04d23181 100644 --- a/Dockerfile +++ b/Dockerfile @@ -60,9 +60,16 @@ COPY . /var/www # Copy existing application directory permissions COPY --chown=www:www . /var/www -# Change current user to www (disabled when running through GitHub Actions) +# Switch to root to copy entry point scripts +USER root + +# Copy entry point and set permissions for www user +COPY docker/entrypoint.sh /usr/local/bin/entrypoint +RUN chmod +x /usr/local/bin/entrypoint && \ + chown www:www /usr/local/bin/entrypoint + +# Switch to www user USER www -# Expose port 9000 and start php-fpm server -EXPOSE 9000 -CMD ["php-fpm"] +# Run entrypoint +CMD ["/usr/local/bin/entrypoint"] \ No newline at end of file diff --git a/_ide_helper.php b/_ide_helper.php index c5fbcfa9..28489b5a 100644 --- a/_ide_helper.php +++ b/_ide_helper.php @@ -5,7 +5,7 @@ /** * A helper file for Laravel, to provide autocomplete information to your IDE - * Generated for Laravel 11.0.7. + * Generated for Laravel 11.24.1. * * This file should not be included in your code, only analyzed by your IDE! * @@ -566,6 +566,7 @@ * @param string $abstract * @param array $parameters * @return mixed + * @throws \Illuminate\Contracts\Container\BindingResolutionException * @static */ public static function make($abstract, $parameters = []) { @@ -656,6 +657,26 @@ { /** @var \Illuminate\Foundation\Application $instance */ return $instance->handleCommand($input); + } + /** + * Determine if the framework's base configuration should be merged. + * + * @return bool + * @static + */ public static function shouldMergeFrameworkConfiguration() + { + /** @var \Illuminate\Foundation\Application $instance */ + return $instance->shouldMergeFrameworkConfiguration(); + } + /** + * Indicate that the framework's base configuration should not be merged. + * + * @return \Illuminate\Foundation\Application + * @static + */ public static function dontMergeFrameworkConfiguration() + { + /** @var \Illuminate\Foundation\Application $instance */ + return $instance->dontMergeFrameworkConfiguration(); } /** * Determine if middleware has been disabled for the application. @@ -817,7 +838,7 @@ /** * Get the service providers that have been loaded. * - * @return array + * @return array * @static */ public static function getLoadedProviders() { @@ -993,6 +1014,18 @@ { //Method inherited from \Illuminate\Container\Container /** @var \Illuminate\Foundation\Application $instance */ return $instance->when($concrete); + } + /** + * Define a contextual binding based on an attribute. + * + * @param string $attribute + * @param \Closure $handler + * @return void + * @static + */ public static function whenHasAttribute($attribute, $handler) + { //Method inherited from \Illuminate\Container\Container + /** @var \Illuminate\Foundation\Application $instance */ + $instance->whenHasAttribute($attribute, $handler); } /** * Returns true if the container can return an entry for the given identifier. @@ -1329,6 +1362,17 @@ { //Method inherited from \Illuminate\Container\Container /** @var \Illuminate\Foundation\Application $instance */ return $instance->build($concrete); + } + /** + * Resolve a dependency based on an attribute. + * + * @param \ReflectionAttribute $attribute + * @return mixed + * @static + */ public static function resolveFromAttribute($attribute) + { //Method inherited from \Illuminate\Container\Container + /** @var \Illuminate\Foundation\Application $instance */ + return $instance->resolveFromAttribute($attribute); } /** * Register a new before resolving callback for all types. @@ -1365,6 +1409,30 @@ { //Method inherited from \Illuminate\Container\Container /** @var \Illuminate\Foundation\Application $instance */ $instance->afterResolving($abstract, $callback); + } + /** + * Register a new after resolving attribute callback for all types. + * + * @param string $attribute + * @param \Closure $callback + * @return void + * @static + */ public static function afterResolvingAttribute($attribute, $callback) + { //Method inherited from \Illuminate\Container\Container + /** @var \Illuminate\Foundation\Application $instance */ + $instance->afterResolvingAttribute($attribute, $callback); + } + /** + * Fire all of the after resolving attribute callbacks. + * + * @param \ReflectionAttribute[] $abstract + * @param mixed $object + * @return void + * @static + */ public static function fireAfterResolvingAttributeCallbacks($attributes, $object) + { //Method inherited from \Illuminate\Container\Container + /** @var \Illuminate\Foundation\Application $instance */ + $instance->fireAfterResolvingAttributeCallbacks($attributes, $object); } /** * Get the container's bindings. @@ -1498,6 +1566,7 @@ * * @param string $name * @param object|callable $macro + * @param-closure-this static $macro * @return void * @static */ public static function macro($name, $macro) @@ -1928,7 +1997,7 @@ /** * Get the currently authenticated user. * - * @return \OGame\Models\User|null + * @return \OGame\Models\User|null * @static */ public static function user() { @@ -1960,7 +2029,7 @@ * Log the given user ID into the application without sessions or cookies. * * @param mixed $id - * @return \OGame\Models\User|false + * @return \OGame\Models\User|false * @static */ public static function onceUsingId($id) { @@ -2034,7 +2103,7 @@ * * @param mixed $id * @param bool $remember - * @return \OGame\Models\User|false + * @return \OGame\Models\User|false * @static */ public static function loginUsingId($id, $remember = false) { @@ -2081,7 +2150,7 @@ * The application must be using the AuthenticateSession middleware. * * @param string $password - * @return \OGame\Models\User|null + * @return \OGame\Models\User|null * @throws \Illuminate\Auth\AuthenticationException * @static */ public static function logoutOtherDevices($password) @@ -2103,7 +2172,7 @@ /** * Get the last user we attempted to authenticate. * - * @return \OGame\Models\User + * @return \OGame\Models\User * @static */ public static function getLastAttempted() { @@ -2207,7 +2276,7 @@ /** * Return the currently cached user. * - * @return \OGame\Models\User|null + * @return \OGame\Models\User|null * @static */ public static function getUser() { @@ -2259,7 +2328,7 @@ /** * Determine if the current user is authenticated. If not, throw an exception. * - * @return \OGame\Models\User + * @return \OGame\Models\User * @throws \Illuminate\Auth\AuthenticationException * @static */ public static function authenticate() @@ -2333,6 +2402,7 @@ * * @param string $name * @param object|callable $macro + * @param-closure-this static $macro * @return void * @static */ public static function macro($name, $macro) @@ -2889,6 +2959,33 @@ { /** @var \Illuminate\Broadcasting\BroadcastManager $instance */ return $instance->socket($request); + } + /** + * Begin sending an anonymous broadcast to the given channels. + * + * @static + */ public static function on($channels) + { + /** @var \Illuminate\Broadcasting\BroadcastManager $instance */ + return $instance->on($channels); + } + /** + * Begin sending an anonymous broadcast to the given private channels. + * + * @static + */ public static function private($channel) + { + /** @var \Illuminate\Broadcasting\BroadcastManager $instance */ + return $instance->private($channel); + } + /** + * Begin sending an anonymous broadcast to the given presence channels. + * + * @static + */ public static function presence($channel) + { + /** @var \Illuminate\Broadcasting\BroadcastManager $instance */ + return $instance->presence($channel); } /** * Begin broadcasting an event. @@ -3483,13 +3580,23 @@ { /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */ return $instance->serializeAndRestore($serializeAndRestore); + } + /** + * Get the batches that have been dispatched. + * + * @return array + * @static + */ public static function dispatchedBatches() + { + /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */ + return $instance->dispatchedBatches(); } } /** * * * @see \Illuminate\Cache\CacheManager - * @mixin \Illuminate\Cache\Repository + * @see \Illuminate\Cache\Repository */ class Cache { /** * Get a cache store instance by name, wrapped in a repository. @@ -3839,6 +3946,21 @@ { /** @var \Illuminate\Cache\Repository $instance */ return $instance->rememberForever($key, $callback); + } + /** + * Retrieve an item from the cache by key, refreshing it in the background if it is stale. + * + * @template TCacheValue + * @param string $key + * @param \Illuminate\Cache\array{ 0: \DateTimeInterface|\DateInterval|int, 1: \DateTimeInterface|\DateInterval|int } $ttl + * @param \Illuminate\Cache\(callable(): TCacheValue) $callback + * @param \Illuminate\Cache\array{ seconds?: int, owner?: string }|null $lock + * @return \Illuminate\Cache\TCacheValue + * @static + */ public static function flexible($key, $ttl, $callback, $lock = null) + { + /** @var \Illuminate\Cache\Repository $instance */ + return $instance->flexible($key, $ttl, $callback, $lock); } /** * Remove an item from the cache. @@ -3958,7 +4080,7 @@ /** * Get the event dispatcher instance. * - * @return \Illuminate\Contracts\Events\Dispatcher + * @return \Illuminate\Contracts\Events\Dispatcher|null * @static */ public static function getEventDispatcher() { @@ -4026,6 +4148,7 @@ * * @param string $name * @param object|callable $macro + * @param-closure-this static $macro * @return void * @static */ public static function macro($name, $macro) @@ -4152,6 +4275,158 @@ { /** @var \Illuminate\Cache\DatabaseStore $instance */ return $instance->getPrefix(); + } + /** + * Set the cache key prefix. + * + * @param string $prefix + * @return void + * @static + */ public static function setPrefix($prefix) + { + /** @var \Illuminate\Cache\DatabaseStore $instance */ + $instance->setPrefix($prefix); + } + } + /** + * + * + * @method static array run(\Closure|array $tasks) + * @method static \Illuminate\Support\Defer\DeferredCallback defer(\Closure|array $tasks) + * @see \Illuminate\Concurrency\ConcurrencyManager + */ class Concurrency { + /** + * Get a driver instance by name. + * + * @param string|null $name + * @return mixed + * @static + */ public static function driver($name = null) + { + /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */ + return $instance->driver($name); + } + /** + * Create an instance of the process concurrency driver. + * + * @param array $config + * @return \Illuminate\Concurrency\ProcessDriver + * @static + */ public static function createProcessDriver($config) + { + /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */ + return $instance->createProcessDriver($config); + } + /** + * Create an instance of the fork concurrency driver. + * + * @param array $config + * @return \Illuminate\Concurrency\ForkDriver + * @throws \RuntimeException + * @static + */ public static function createForkDriver($config) + { + /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */ + return $instance->createForkDriver($config); + } + /** + * Create an instance of the sync concurrency driver. + * + * @param array $config + * @return \Illuminate\Concurrency\SyncDriver + * @static + */ public static function createSyncDriver($config) + { + /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */ + return $instance->createSyncDriver($config); + } + /** + * Get the default instance name. + * + * @return string + * @static + */ public static function getDefaultInstance() + { + /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */ + return $instance->getDefaultInstance(); + } + /** + * Set the default instance name. + * + * @param string $name + * @return void + * @static + */ public static function setDefaultInstance($name) + { + /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */ + $instance->setDefaultInstance($name); + } + /** + * Get the instance specific configuration. + * + * @param string $name + * @return array + * @static + */ public static function getInstanceConfig($name) + { + /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */ + return $instance->getInstanceConfig($name); + } + /** + * Get an instance by name. + * + * @param string|null $name + * @return mixed + * @static + */ public static function instance($name = null) + { //Method inherited from \Illuminate\Support\MultipleInstanceManager + /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */ + return $instance->instance($name); + } + /** + * Unset the given instances. + * + * @param array|string|null $name + * @return \Illuminate\Concurrency\ConcurrencyManager + * @static + */ public static function forgetInstance($name = null) + { //Method inherited from \Illuminate\Support\MultipleInstanceManager + /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */ + return $instance->forgetInstance($name); + } + /** + * Disconnect the given instance and remove from local cache. + * + * @param string|null $name + * @return void + * @static + */ public static function purge($name = null) + { //Method inherited from \Illuminate\Support\MultipleInstanceManager + /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */ + $instance->purge($name); + } + /** + * Register a custom instance creator Closure. + * + * @param string $name + * @param \Closure $callback + * @return \Illuminate\Concurrency\ConcurrencyManager + * @static + */ public static function extend($name, $callback) + { //Method inherited from \Illuminate\Support\MultipleInstanceManager + /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */ + return $instance->extend($name, $callback); + } + /** + * Set the application instance used by the manager. + * + * @param \Illuminate\Contracts\Foundation\Application $app + * @return \Illuminate\Concurrency\ConcurrencyManager + * @static + */ public static function setApplication($app) + { //Method inherited from \Illuminate\Support\MultipleInstanceManager + /** @var \Illuminate\Concurrency\ConcurrencyManager $instance */ + return $instance->setApplication($app); } } /** @@ -4349,6 +4624,7 @@ * * @param string $name * @param object|callable $macro + * @param-closure-this static $macro * @return void * @static */ public static function macro($name, $macro) @@ -4438,23 +4714,49 @@ * Retrieve the given key's value. * * @param string $key + * @param mixed $default * @return mixed * @static - */ public static function get($key) + */ public static function get($key, $default = null) { /** @var \Illuminate\Log\Context\Repository $instance */ - return $instance->get($key); + return $instance->get($key, $default); } /** * Retrieve the given key's hidden value. * * @param string $key + * @param mixed $default + * @return mixed + * @static + */ public static function getHidden($key, $default = null) + { + /** @var \Illuminate\Log\Context\Repository $instance */ + return $instance->getHidden($key, $default); + } + /** + * Retrieve the given key's value and then forget it. + * + * @param string $key + * @param mixed $default + * @return mixed + * @static + */ public static function pull($key, $default = null) + { + /** @var \Illuminate\Log\Context\Repository $instance */ + return $instance->pull($key, $default); + } + /** + * Retrieve the given key's hidden value and then forget it. + * + * @param string $key + * @param mixed $default * @return mixed * @static - */ public static function getHidden($key) + */ public static function pullHidden($key, $default = null) { /** @var \Illuminate\Log\Context\Repository $instance */ - return $instance->getHidden($key); + return $instance->pullHidden($key, $default); } /** * Retrieve only the values of the given keys. @@ -4554,6 +4856,7 @@ * @param string $key * @param mixed $values * @return \Illuminate\Log\Context\Repository + * @throws \RuntimeException * @static */ public static function push($key, ...$values) { @@ -4566,11 +4869,40 @@ * @param string $key * @param mixed $values * @return \Illuminate\Log\Context\Repository + * @throws \RuntimeException * @static */ public static function pushHidden($key, ...$values) { /** @var \Illuminate\Log\Context\Repository $instance */ return $instance->pushHidden($key, ...$values); + } + /** + * Determine if the given value is in the given stack. + * + * @param string $key + * @param mixed $value + * @param bool $strict + * @return bool + * @throws \RuntimeException + * @static + */ public static function stackContains($key, $value, $strict = false) + { + /** @var \Illuminate\Log\Context\Repository $instance */ + return $instance->stackContains($key, $value, $strict); + } + /** + * Determine if the given value is in the given hidden stack. + * + * @param string $key + * @param mixed $value + * @param bool $strict + * @return bool + * @throws \RuntimeException + * @static + */ public static function hiddenStackContains($key, $value, $strict = false) + { + /** @var \Illuminate\Log\Context\Repository $instance */ + return $instance->hiddenStackContains($key, $value, $strict); } /** * Determine if the repository is empty. @@ -4642,17 +4974,49 @@ * @internal * @param \Illuminate\Log\Context\?array $context * @return \Illuminate\Log\Context\Repository + * @throws \RuntimeException * @static */ public static function hydrate($context) { /** @var \Illuminate\Log\Context\Repository $instance */ return $instance->hydrate($context); + } + /** + * Apply the callback if the given "value" is (or resolves to) truthy. + * + * @template TWhenParameter + * @template TWhenReturnType + * @param \Illuminate\Log\Context\(\Closure($this): TWhenParameter)|TWhenParameter|null $value + * @param \Illuminate\Log\Context\(callable($this, TWhenParameter): TWhenReturnType)|null $callback + * @param \Illuminate\Log\Context\(callable($this, TWhenParameter): TWhenReturnType)|null $default + * @return $this|\Illuminate\Log\Context\TWhenReturnType + * @static + */ public static function when($value = null, $callback = null, $default = null) + { + /** @var \Illuminate\Log\Context\Repository $instance */ + return $instance->when($value, $callback, $default); + } + /** + * Apply the callback if the given "value" is (or resolves to) falsy. + * + * @template TUnlessParameter + * @template TUnlessReturnType + * @param \Illuminate\Log\Context\(\Closure($this): TUnlessParameter)|TUnlessParameter|null $value + * @param \Illuminate\Log\Context\(callable($this, TUnlessParameter): TUnlessReturnType)|null $callback + * @param \Illuminate\Log\Context\(callable($this, TUnlessParameter): TUnlessReturnType)|null $default + * @return $this|\Illuminate\Log\Context\TUnlessReturnType + * @static + */ public static function unless($value = null, $callback = null, $default = null) + { + /** @var \Illuminate\Log\Context\Repository $instance */ + return $instance->unless($value, $callback, $default); } /** * Register a custom macro. * * @param string $name * @param object|callable $macro + * @param-closure-this static $macro * @return void * @static */ public static function macro($name, $macro) @@ -4857,6 +5221,7 @@ * * @param string $name * @param object|callable $macro + * @param-closure-this static $macro * @return void * @static */ public static function macro($name, $macro) @@ -5004,7 +5369,7 @@ /** * Set the previous / legacy encryption keys that should be utilized if decryption fails. * - * @param array $key + * @param array $keys * @return \Illuminate\Encryption\Encrypter * @static */ public static function previousKeys($keys) @@ -5317,6 +5682,7 @@ * * @param string $name * @param object|callable $macro + * @param-closure-this static $macro * @return void * @static */ public static function macro($name, $macro) @@ -5368,21 +5734,54 @@ return $instance->macroCall($method, $parameters); } /** - * Determine if the connected database is a MariaDB database. + * Get a human-readable name for the given connection driver. * - * @return bool + * @return string * @static - */ public static function isMaria() + */ public static function getDriverTitle() { /** @var \Illuminate\Database\MySqlConnection $instance */ - return $instance->isMaria(); + return $instance->getDriverTitle(); } /** - * Get the server version for the connection. + * Run an insert statement against the database. * - * @return string + * @param string $query + * @param array $bindings + * @param string|null $sequence + * @return bool * @static - */ public static function getServerVersion() + */ public static function insert($query, $bindings = [], $sequence = null) + { + /** @var \Illuminate\Database\MySqlConnection $instance */ + return $instance->insert($query, $bindings, $sequence); + } + /** + * Get the connection's last insert ID. + * + * @return string|int|null + * @static + */ public static function getLastInsertId() + { + /** @var \Illuminate\Database\MySqlConnection $instance */ + return $instance->getLastInsertId(); + } + /** + * Determine if the connected database is a MariaDB database. + * + * @return bool + * @static + */ public static function isMaria() + { + /** @var \Illuminate\Database\MySqlConnection $instance */ + return $instance->isMaria(); + } + /** + * Get the server version for the connection. + * + * @return string + * @static + */ public static function getServerVersion() { /** @var \Illuminate\Database\MySqlConnection $instance */ return $instance->getServerVersion(); @@ -5538,18 +5937,6 @@ { //Method inherited from \Illuminate\Database\Connection /** @var \Illuminate\Database\MySqlConnection $instance */ return $instance->cursor($query, $bindings, $useReadPdo); - } - /** - * Run an insert statement against the database. - * - * @param string $query - * @param array $bindings - * @return bool - * @static - */ public static function insert($query, $bindings = []) - { //Method inherited from \Illuminate\Database\Connection - /** @var \Illuminate\Database\MySqlConnection $instance */ - return $instance->insert($query, $bindings); } /** * Run an update statement against the database. @@ -5609,6 +5996,16 @@ { //Method inherited from \Illuminate\Database\Connection /** @var \Illuminate\Database\MySqlConnection $instance */ return $instance->unprepared($query); + } + /** + * Get the number of open connections for the database. + * + * @return int|null + * @static + */ public static function threadCount() + { //Method inherited from \Illuminate\Database\Connection + /** @var \Illuminate\Database\MySqlConnection $instance */ + return $instance->threadCount(); } /** * Execute the given callback in "dry run" mode. @@ -6281,8 +6678,8 @@ /** * Register an event listener with the dispatcher. * - * @param \Closure|string|array $events - * @param \Closure|string|array|null $listener + * @param \Illuminate\Events\Queued\Closure|\Closure|string|array $events + * @param \Illuminate\Events\Queued\Closure|\Closure|string|array|null $listener * @return void * @static */ public static function listen($events, $listener = null) @@ -6464,6 +6861,7 @@ * * @param string $name * @param object|callable $macro + * @param-closure-this static $macro * @return void * @static */ public static function macro($name, $macro) @@ -6592,6 +6990,16 @@ { /** @var \Illuminate\Support\Testing\Fakes\EventFake $instance */ return $instance->hasDispatched($event); + } + /** + * Get the events that have been dispatched. + * + * @return array + * @static + */ public static function dispatchedEvents() + { + /** @var \Illuminate\Support\Testing\Fakes\EventFake $instance */ + return $instance->dispatchedEvents(); } } /** @@ -6702,7 +7110,7 @@ * * @param string $path * @param string $algorithm - * @return string + * @return string|false * @static */ public static function hash($path, $algorithm = 'md5') { @@ -7184,6 +7592,7 @@ * * @param string $name * @param object|callable $macro + * @param-closure-this static $macro * @return void * @static */ public static function macro($name, $macro) @@ -7269,7 +7678,7 @@ /** * Define a new ability. * - * @param string $ability + * @param \BackedEnum|string $ability * @param callable|array|string $callback * @return \Illuminate\Auth\Access\Gate * @throws \InvalidArgumentException @@ -7329,7 +7738,7 @@ /** * Determine if all of the given abilities should be granted for the current user. * - * @param \Illuminate\Auth\Access\iterable|string $ability + * @param \Illuminate\Auth\Access\iterable|\BackedEnum|string $ability * @param array|mixed $arguments * @return bool * @static @@ -7341,7 +7750,7 @@ /** * Determine if any of the given abilities should be denied for the current user. * - * @param \Illuminate\Auth\Access\iterable|string $ability + * @param \Illuminate\Auth\Access\iterable|\BackedEnum|string $ability * @param array|mixed $arguments * @return bool * @static @@ -7353,7 +7762,7 @@ /** * Determine if all of the given abilities should be granted for the current user. * - * @param \Illuminate\Auth\Access\iterable|string $abilities + * @param \Illuminate\Auth\Access\iterable|\BackedEnum|string $abilities * @param array|mixed $arguments * @return bool * @static @@ -7365,7 +7774,7 @@ /** * Determine if any one of the given abilities should be granted for the current user. * - * @param \Illuminate\Auth\Access\iterable|string $abilities + * @param \Illuminate\Auth\Access\iterable|\BackedEnum|string $abilities * @param array|mixed $arguments * @return bool * @static @@ -7377,7 +7786,7 @@ /** * Determine if all of the given abilities should be denied for the current user. * - * @param \Illuminate\Auth\Access\iterable|string $abilities + * @param \Illuminate\Auth\Access\iterable|\BackedEnum|string $abilities * @param array|mixed $arguments * @return bool * @static @@ -7389,7 +7798,7 @@ /** * Determine if the given ability should be granted for the current user. * - * @param string $ability + * @param \BackedEnum|string $ability * @param array|mixed $arguments * @return \Illuminate\Auth\Access\Response * @throws \Illuminate\Auth\Access\AuthorizationException @@ -7402,7 +7811,7 @@ /** * Inspect the user for the given ability. * - * @param string $ability + * @param \BackedEnum|string $ability * @param array|mixed $arguments * @return \Illuminate\Auth\Access\Response * @static @@ -7641,6 +8050,18 @@ { /** @var \Illuminate\Hashing\HashManager $instance */ return $instance->getDefaultDriver(); + } + /** + * Verifies that the configuration is less than or equal to what is configured. + * + * @param array $value + * @return bool + * @internal + * @static + */ public static function verifyConfiguration($value) + { + /** @var \Illuminate\Hashing\HashManager $instance */ + return $instance->verifyConfiguration($value); } /** * Get a driver instance. @@ -7744,8 +8165,8 @@ * @method static \Illuminate\Http\Client\PendingRequest withResponseMiddleware(callable $middleware) * @method static \Illuminate\Http\Client\PendingRequest beforeSending(callable $callback) * @method static \Illuminate\Http\Client\PendingRequest throw(callable|null $callback = null) - * @method static \Illuminate\Http\Client\PendingRequest throwIf(callable|bool $condition, callable|null $throwCallback = null) - * @method static \Illuminate\Http\Client\PendingRequest throwUnless(bool $condition) + * @method static \Illuminate\Http\Client\PendingRequest throwIf(callable|bool $condition) + * @method static \Illuminate\Http\Client\PendingRequest throwUnless(callable|bool $condition) * @method static \Illuminate\Http\Client\PendingRequest dump() * @method static \Illuminate\Http\Client\PendingRequest dd() * @method static \Illuminate\Http\Client\Response get(string $url, array|string|null $query = null) @@ -7983,6 +8404,16 @@ { /** @var \Illuminate\Http\Client\Factory $instance */ return $instance->recorded($callback); + } + /** + * Create a new pending request instance for this factory. + * + * @return \Illuminate\Http\Client\PendingRequest + * @static + */ public static function createPendingRequest() + { + /** @var \Illuminate\Http\Client\Factory $instance */ + return $instance->createPendingRequest(); } /** * Get the current event dispatcher implementation. @@ -8009,6 +8440,7 @@ * * @param string $name * @param object|callable $macro + * @param-closure-this static $macro * @return void * @static */ public static function macro($name, $macro) @@ -8334,6 +8766,7 @@ * * @param string $name * @param object|callable $macro + * @param-closure-this static $macro * @return void * @static */ public static function macro($name, $macro) @@ -8794,7 +9227,7 @@ * Assert if a mailable was sent based on a truth-test callback. * * @param string|\Closure $mailable - * @param callable|int|null $callback + * @param callable|array|string|int|null $callback * @return void * @static */ public static function assertSent($mailable, $callback = null) @@ -8818,7 +9251,7 @@ * Determine if a mailable was not sent based on a truth-test callback. * * @param string|\Closure $mailable - * @param callable|null $callback + * @param callable|array|string|null $callback * @return void * @static */ public static function assertNotSent($mailable, $callback = null) @@ -8850,7 +9283,7 @@ * Assert if a mailable was queued based on a truth-test callback. * * @param string|\Closure $mailable - * @param callable|int|null $callback + * @param callable|array|string|int|null $callback * @return void * @static */ public static function assertQueued($mailable, $callback = null) @@ -8862,7 +9295,7 @@ * Determine if a mailable was not queued based on a truth-test callback. * * @param string|\Closure $mailable - * @param callable|null $callback + * @param callable|array|string|null $callback * @return void * @static */ public static function assertNotQueued($mailable, $callback = null) @@ -9340,6 +9773,17 @@ { /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */ return $instance->hasSent($notifiable, $notification); + } + /** + * Specify if notification should be serialized and restored when being "pushed" to the queue. + * + * @param bool $serializeAndRestore + * @return \Illuminate\Support\Testing\Fakes\NotificationFake + * @static + */ public static function serializeAndRestore($serializeAndRestore = true) + { + /** @var \Illuminate\Support\Testing\Fakes\NotificationFake $instance */ + return $instance->serializeAndRestore($serializeAndRestore); } /** * Get the notifications that have been sent. @@ -9356,6 +9800,7 @@ * * @param string $name * @param object|callable $macro + * @param-closure-this static $macro * @return void * @static */ public static function macro($name, $macro) @@ -9665,6 +10110,7 @@ * * @param string $name * @param object|callable $macro + * @param-closure-this static $macro * @return void * @static */ public static function macro($name, $macro) @@ -10396,6 +10842,19 @@ { /** @var \Illuminate\Cache\RateLimiter $instance */ return $instance->increment($key, $decaySeconds, $amount); + } + /** + * Decrement the counter for a given key for a given decay time by a given amount. + * + * @param string $key + * @param int $decaySeconds + * @param int $amount + * @return int + * @static + */ public static function decrement($key, $decaySeconds = 60, $amount = 1) + { + /** @var \Illuminate\Cache\RateLimiter $instance */ + return $instance->decrement($key, $decaySeconds, $amount); } /** * Get the number of attempts for the given key. @@ -10578,7 +11037,7 @@ /** * Create a new redirect response to a named route. * - * @param string $route + * @param \BackedEnum|string $route * @param mixed $parameters * @param int $status * @param array $headers @@ -10592,7 +11051,7 @@ /** * Create a new redirect response to a signed named route. * - * @param string $route + * @param \BackedEnum|string $route * @param mixed $parameters * @param \DateTimeInterface|\DateInterval|int|null $expiration * @param int $status @@ -10607,7 +11066,7 @@ /** * Create a new redirect response to a signed named route. * - * @param string $route + * @param \BackedEnum|string $route * @param \DateTimeInterface|\DateInterval|int|null $expiration * @param mixed $parameters * @param int $status @@ -10680,6 +11139,7 @@ * * @param string $name * @param object|callable $macro + * @param-closure-this static $macro * @return void * @static */ public static function macro($name, $macro) @@ -11002,7 +11462,7 @@ return $instance->mergeIfMissing($input); } /** - * Replace the input for the current request. + * Replace the input values for the current request. * * @param array $input * @return \Illuminate\Http\Request @@ -12682,6 +13142,7 @@ * * @param string $name * @param object|callable $macro + * @param-closure-this static $macro * @return void * @static */ public static function macro($name, $macro) @@ -12891,6 +13352,7 @@ * @param array $headers * @param string|null $disposition * @return \Symfony\Component\HttpFoundation\StreamedResponse + * @throws \Illuminate\Routing\Exceptions\StreamedResponseException * @static */ public static function streamDownload($callback, $name = null, $headers = [], $disposition = 'attachment') { @@ -12998,6 +13460,7 @@ * * @param string $name * @param object|callable $macro + * @param-closure-this static $macro * @return void * @static */ public static function macro($name, $macro) @@ -13048,10 +13511,10 @@ * @method static \Illuminate\Routing\RouteRegistrar whereIn(array|string $parameters, array $values) * @method static \Illuminate\Routing\RouteRegistrar as(string $value) * @method static \Illuminate\Routing\RouteRegistrar controller(string $controller) - * @method static \Illuminate\Routing\RouteRegistrar domain(string $value) + * @method static \Illuminate\Routing\RouteRegistrar domain(\BackedEnum|string $value) * @method static \Illuminate\Routing\RouteRegistrar middleware(array|string|null $middleware) * @method static \Illuminate\Routing\RouteRegistrar missing(\Closure $missing) - * @method static \Illuminate\Routing\RouteRegistrar name(string $value) + * @method static \Illuminate\Routing\RouteRegistrar name(\BackedEnum|string $value) * @method static \Illuminate\Routing\RouteRegistrar namespace(string|null $value) * @method static \Illuminate\Routing\RouteRegistrar prefix(string $prefix) * @method static \Illuminate\Routing\RouteRegistrar scopeBindings() @@ -13474,7 +13937,7 @@ $instance->substituteImplicitBindings($route); } /** - * Register a callback to to run after implicit bindings are substituted. + * Register a callback to run after implicit bindings are substituted. * * @param callable $callback * @return \Illuminate\Routing\Router @@ -13787,7 +14250,7 @@ /** * Alias for the "currentRouteUses" method. * - * @param array $patterns + * @param array|string $patterns * @return bool * @static */ public static function uses(...$patterns) @@ -13897,6 +14360,7 @@ * * @param string $name * @param object|callable $macro + * @param-closure-this static $macro * @return void * @static */ public static function macro($name, $macro) @@ -13946,6 +14410,17 @@ { /** @var \Illuminate\Routing\Router $instance */ return $instance->macroCall($method, $parameters); + } + /** + * Call the given Closure with this instance then return the instance. + * + * @param \Illuminate\Routing\(callable($this): mixed)|null $callback + * @return \Illuminate\Routing\($callback is null ? \Illuminate\Support\HigherOrderTapProxy : $this) + * @static + */ public static function tap($callback = null) + { + /** @var \Illuminate\Routing\Router $instance */ + return $instance->tap($callback); } /** * @@ -14100,6 +14575,7 @@ * * @param string $name * @param object|callable $macro + * @param-closure-this static $macro * @return void * @static */ public static function macro($name, $macro) @@ -14566,6 +15042,7 @@ * * @param string $name * @param object|callable $macro + * @param-closure-this static $macro * @return void * @static */ public static function macro($name, $macro) @@ -14830,7 +15307,7 @@ return $instance->missing($key); } /** - * Checks if a key is present and not null. + * Determine if a key is present and not null. * * @param string|array $key * @return bool @@ -14839,6 +15316,17 @@ { /** @var \Illuminate\Session\Store $instance */ return $instance->has($key); + } + /** + * Determine if any of the given keys are present and not null. + * + * @param string|array $key + * @return bool + * @static + */ public static function hasAny($key) + { + /** @var \Illuminate\Session\Store $instance */ + return $instance->hasAny($key); } /** * Get an item from the session. @@ -15108,6 +15596,16 @@ { /** @var \Illuminate\Session\Store $instance */ $instance->setName($name); + } + /** + * Get the current session ID. + * + * @return string + * @static + */ public static function id() + { + /** @var \Illuminate\Session\Store $instance */ + return $instance->id(); } /** * Get the current session ID. @@ -15250,6 +15748,7 @@ * * @param string $name * @param object|callable $macro + * @param-closure-this static $macro * @return void * @static */ public static function macro($name, $macro) @@ -15304,7 +15803,7 @@ * Get a filesystem instance. * * @param string|null $name - * @return \Illuminate\Filesystem\FilesystemAdapter + * @return \Illuminate\Filesystem\LocalFilesystemAdapter * @static */ public static function drive($name = null) { @@ -15315,7 +15814,7 @@ * Get a filesystem instance. * * @param string|null $name - * @return \Illuminate\Filesystem\FilesystemAdapter + * @return \Illuminate\Filesystem\LocalFilesystemAdapter * @static */ public static function disk($name = null) { @@ -15336,7 +15835,7 @@ * Build an on-demand disk. * * @param string|array $config - * @return \Illuminate\Filesystem\FilesystemAdapter + * @return \Illuminate\Filesystem\LocalFilesystemAdapter * @static */ public static function build($config) { @@ -15347,18 +15846,19 @@ * Create an instance of the local driver. * * @param array $config - * @return \Illuminate\Filesystem\FilesystemAdapter + * @param string $name + * @return \Illuminate\Filesystem\LocalFilesystemAdapter * @static - */ public static function createLocalDriver($config) + */ public static function createLocalDriver($config, $name = 'local') { /** @var \Illuminate\Filesystem\FilesystemManager $instance */ - return $instance->createLocalDriver($config); + return $instance->createLocalDriver($config, $name); } /** * Create an instance of the ftp driver. * * @param array $config - * @return \Illuminate\Filesystem\FilesystemAdapter + * @return \Illuminate\Filesystem\LocalFilesystemAdapter * @static */ public static function createFtpDriver($config) { @@ -15369,7 +15869,7 @@ * Create an instance of the sftp driver. * * @param array $config - * @return \Illuminate\Filesystem\FilesystemAdapter + * @return \Illuminate\Filesystem\LocalFilesystemAdapter * @static */ public static function createSftpDriver($config) { @@ -15391,7 +15891,7 @@ * Create a scoped driver. * * @param array $config - * @return \Illuminate\Filesystem\FilesystemAdapter + * @return \Illuminate\Filesystem\LocalFilesystemAdapter * @static */ public static function createScopedDriver($config) { @@ -15474,39 +15974,85 @@ { /** @var \Illuminate\Filesystem\FilesystemManager $instance */ return $instance->setApplication($app); + } + /** + * Determine if temporary URLs can be generated. + * + * @return bool + * @static + */ public static function providesTemporaryUrls() + { + /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + return $instance->providesTemporaryUrls(); + } + /** + * Get a temporary URL for the file at the given path. + * + * @param string $path + * @param \DateTimeInterface $expiration + * @param array $options + * @return string + * @static + */ public static function temporaryUrl($path, $expiration, $options = []) + { + /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + return $instance->temporaryUrl($path, $expiration, $options); + } + /** + * Specify the name of the disk the adapter is managing. + * + * @param string $disk + * @return \Illuminate\Filesystem\LocalFilesystemAdapter + * @static + */ public static function diskName($disk) + { + /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + return $instance->diskName($disk); + } + /** + * Indiate that signed URLs should serve the corresponding files. + * + * @param bool $serve + * @param \Closure|null $urlGeneratorResolver + * @return \Illuminate\Filesystem\LocalFilesystemAdapter + * @static + */ public static function shouldServeSignedUrls($serve = true, $urlGeneratorResolver = null) + { + /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + return $instance->shouldServeSignedUrls($serve, $urlGeneratorResolver); } /** * Assert that the given file or directory exists. * * @param string|array $path * @param string|null $content - * @return \Illuminate\Filesystem\FilesystemAdapter + * @return \Illuminate\Filesystem\LocalFilesystemAdapter * @static */ public static function assertExists($path, $content = null) - { - /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */ + { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter + /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ return $instance->assertExists($path, $content); } /** * Assert that the given file or directory does not exist. * * @param string|array $path - * @return \Illuminate\Filesystem\FilesystemAdapter + * @return \Illuminate\Filesystem\LocalFilesystemAdapter * @static */ public static function assertMissing($path) - { - /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */ + { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter + /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ return $instance->assertMissing($path); } /** * Assert that the given directory is empty. * * @param string $path - * @return \Illuminate\Filesystem\FilesystemAdapter + * @return \Illuminate\Filesystem\LocalFilesystemAdapter * @static */ public static function assertDirectoryEmpty($path) - { - /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */ + { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter + /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ return $instance->assertDirectoryEmpty($path); } /** @@ -15516,8 +16062,8 @@ * @return bool * @static */ public static function exists($path) - { - /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */ + { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter + /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ return $instance->exists($path); } /** @@ -15527,8 +16073,8 @@ * @return bool * @static */ public static function missing($path) - { - /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */ + { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter + /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ return $instance->missing($path); } /** @@ -15538,8 +16084,8 @@ * @return bool * @static */ public static function fileExists($path) - { - /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */ + { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter + /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ return $instance->fileExists($path); } /** @@ -15549,8 +16095,8 @@ * @return bool * @static */ public static function fileMissing($path) - { - /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */ + { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter + /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ return $instance->fileMissing($path); } /** @@ -15560,8 +16106,8 @@ * @return bool * @static */ public static function directoryExists($path) - { - /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */ + { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter + /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ return $instance->directoryExists($path); } /** @@ -15571,8 +16117,8 @@ * @return bool * @static */ public static function directoryMissing($path) - { - /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */ + { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter + /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ return $instance->directoryMissing($path); } /** @@ -15582,8 +16128,8 @@ * @return string * @static */ public static function path($path) - { - /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */ + { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter + /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ return $instance->path($path); } /** @@ -15593,8 +16139,8 @@ * @return string|null * @static */ public static function get($path) - { - /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */ + { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter + /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ return $instance->get($path); } /** @@ -15605,8 +16151,8 @@ * @return array|null * @static */ public static function json($path, $flags = 0) - { - /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */ + { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter + /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ return $instance->json($path, $flags); } /** @@ -15619,20 +16165,35 @@ * @return \Symfony\Component\HttpFoundation\StreamedResponse * @static */ public static function response($path, $name = null, $headers = [], $disposition = 'inline') - { - /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */ + { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter + /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ return $instance->response($path, $name, $headers, $disposition); + } + /** + * Create a streamed download response for a given file. + * + * @param \Illuminate\Http\Request $request + * @param string $path + * @param string|null $name + * @param array $headers + * @return \Symfony\Component\HttpFoundation\StreamedResponse + * @static + */ public static function serve($request, $path, $name = null, $headers = []) + { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter + /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + return $instance->serve($request, $path, $name, $headers); } /** * Create a streamed download response for a given file. * * @param string $path * @param string|null $name + * @param array $headers * @return \Symfony\Component\HttpFoundation\StreamedResponse * @static */ public static function download($path, $name = null, $headers = []) - { - /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */ + { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter + /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ return $instance->download($path, $name, $headers); } /** @@ -15644,8 +16205,8 @@ * @return string|bool * @static */ public static function put($path, $contents, $options = []) - { - /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */ + { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter + /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ return $instance->put($path, $contents, $options); } /** @@ -15657,8 +16218,8 @@ * @return string|false * @static */ public static function putFile($path, $file = null, $options = []) - { - /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */ + { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter + /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ return $instance->putFile($path, $file, $options); } /** @@ -15671,8 +16232,8 @@ * @return string|false * @static */ public static function putFileAs($path, $file, $name = null, $options = []) - { - /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */ + { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter + /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ return $instance->putFileAs($path, $file, $name, $options); } /** @@ -15682,8 +16243,8 @@ * @return string * @static */ public static function getVisibility($path) - { - /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */ + { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter + /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ return $instance->getVisibility($path); } /** @@ -15694,8 +16255,8 @@ * @return bool * @static */ public static function setVisibility($path, $visibility) - { - /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */ + { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter + /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ return $instance->setVisibility($path, $visibility); } /** @@ -15708,8 +16269,8 @@ * @static */ public static function prepend($path, $data, $separator = ' ') - { - /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */ + { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter + /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ return $instance->prepend($path, $data, $separator); } /** @@ -15722,8 +16283,8 @@ * @static */ public static function append($path, $data, $separator = ' ') - { - /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */ + { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter + /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ return $instance->append($path, $data, $separator); } /** @@ -15733,8 +16294,8 @@ * @return bool * @static */ public static function delete($paths) - { - /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */ + { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter + /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ return $instance->delete($paths); } /** @@ -15745,8 +16306,8 @@ * @return bool * @static */ public static function copy($from, $to) - { - /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */ + { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter + /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ return $instance->copy($from, $to); } /** @@ -15757,8 +16318,8 @@ * @return bool * @static */ public static function move($from, $to) - { - /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */ + { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter + /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ return $instance->move($from, $to); } /** @@ -15768,8 +16329,8 @@ * @return int * @static */ public static function size($path) - { - /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */ + { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter + /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ return $instance->size($path); } /** @@ -15779,8 +16340,8 @@ * @throws UnableToProvideChecksum * @static */ public static function checksum($path, $options = []) - { - /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */ + { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter + /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ return $instance->checksum($path, $options); } /** @@ -15790,8 +16351,8 @@ * @return string|false * @static */ public static function mimeType($path) - { - /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */ + { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter + /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ return $instance->mimeType($path); } /** @@ -15801,8 +16362,8 @@ * @return int * @static */ public static function lastModified($path) - { - /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */ + { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter + /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ return $instance->lastModified($path); } /** @@ -15812,8 +16373,8 @@ * @return resource|null The path resource or null on failure. * @static */ public static function readStream($path) - { - /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */ + { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter + /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ return $instance->readStream($path); } /** @@ -15825,8 +16386,8 @@ * @return bool * @static */ public static function writeStream($path, $resource, $options = []) - { - /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */ + { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter + /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ return $instance->writeStream($path, $resource, $options); } /** @@ -15837,33 +16398,9 @@ * @throws \RuntimeException * @static */ public static function url($path) - { - /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */ + { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter + /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ return $instance->url($path); - } - /** - * Determine if temporary URLs can be generated. - * - * @return bool - * @static - */ public static function providesTemporaryUrls() - { - /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */ - return $instance->providesTemporaryUrls(); - } - /** - * Get a temporary URL for the file at the given path. - * - * @param string $path - * @param \DateTimeInterface $expiration - * @param array $options - * @return string - * @throws \RuntimeException - * @static - */ public static function temporaryUrl($path, $expiration, $options = []) - { - /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */ - return $instance->temporaryUrl($path, $expiration, $options); } /** * Get a temporary upload URL for the file at the given path. @@ -15875,8 +16412,8 @@ * @throws \RuntimeException * @static */ public static function temporaryUploadUrl($path, $expiration, $options = []) - { - /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */ + { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter + /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ return $instance->temporaryUploadUrl($path, $expiration, $options); } /** @@ -15887,8 +16424,8 @@ * @return array * @static */ public static function files($directory = null, $recursive = false) - { - /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */ + { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter + /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ return $instance->files($directory, $recursive); } /** @@ -15898,8 +16435,8 @@ * @return array * @static */ public static function allFiles($directory = null) - { - /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */ + { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter + /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ return $instance->allFiles($directory); } /** @@ -15910,8 +16447,8 @@ * @return array * @static */ public static function directories($directory = null, $recursive = false) - { - /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */ + { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter + /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ return $instance->directories($directory, $recursive); } /** @@ -15921,8 +16458,8 @@ * @return array * @static */ public static function allDirectories($directory = null) - { - /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */ + { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter + /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ return $instance->allDirectories($directory); } /** @@ -15932,8 +16469,8 @@ * @return bool * @static */ public static function makeDirectory($path) - { - /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */ + { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter + /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ return $instance->makeDirectory($path); } /** @@ -15943,8 +16480,8 @@ * @return bool * @static */ public static function deleteDirectory($directory) - { - /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */ + { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter + /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ return $instance->deleteDirectory($directory); } /** @@ -15953,8 +16490,8 @@ * @return \League\Flysystem\FilesystemOperator * @static */ public static function getDriver() - { - /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */ + { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter + /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ return $instance->getDriver(); } /** @@ -15963,8 +16500,8 @@ * @return \League\Flysystem\FilesystemAdapter * @static */ public static function getAdapter() - { - /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */ + { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter + /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ return $instance->getAdapter(); } /** @@ -15973,9 +16510,20 @@ * @return array * @static */ public static function getConfig() - { - /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */ + { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter + /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ return $instance->getConfig(); + } + /** + * Define a custom callback that generates file download responses. + * + * @param \Closure $callback + * @return void + * @static + */ public static function serveUsing($callback) + { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter + /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ + $instance->serveUsing($callback); } /** * Define a custom temporary URL builder callback. @@ -15984,8 +16532,8 @@ * @return void * @static */ public static function buildTemporaryUrlsUsing($callback) - { - /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */ + { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter + /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ $instance->buildTemporaryUrlsUsing($callback); } /** @@ -16000,7 +16548,7 @@ * @static */ public static function when($value = null, $callback = null, $default = null) { - /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */ + /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ return $instance->when($value, $callback, $default); } /** @@ -16015,7 +16563,7 @@ * @static */ public static function unless($value = null, $callback = null, $default = null) { - /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */ + /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ return $instance->unless($value, $callback, $default); } /** @@ -16023,11 +16571,12 @@ * * @param string $name * @param object|callable $macro + * @param-closure-this static $macro * @return void * @static */ public static function macro($name, $macro) - { - \Illuminate\Filesystem\FilesystemAdapter::macro($name, $macro); + { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter + \Illuminate\Filesystem\LocalFilesystemAdapter::macro($name, $macro); } /** * Mix another object into the class. @@ -16038,8 +16587,8 @@ * @throws \ReflectionException * @static */ public static function mixin($mixin, $replace = true) - { - \Illuminate\Filesystem\FilesystemAdapter::mixin($mixin, $replace); + { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter + \Illuminate\Filesystem\LocalFilesystemAdapter::mixin($mixin, $replace); } /** * Checks if macro is registered. @@ -16048,8 +16597,8 @@ * @return bool * @static */ public static function hasMacro($name) - { - return \Illuminate\Filesystem\FilesystemAdapter::hasMacro($name); + { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter + return \Illuminate\Filesystem\LocalFilesystemAdapter::hasMacro($name); } /** * Flush the existing macros. @@ -16057,8 +16606,8 @@ * @return void * @static */ public static function flushMacros() - { - \Illuminate\Filesystem\FilesystemAdapter::flushMacros(); + { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter + \Illuminate\Filesystem\LocalFilesystemAdapter::flushMacros(); } /** * Dynamically handle calls to the class. @@ -16069,8 +16618,8 @@ * @throws \BadMethodCallException * @static */ public static function macroCall($method, $parameters) - { - /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */ + { //Method inherited from \Illuminate\Filesystem\FilesystemAdapter + /** @var \Illuminate\Filesystem\LocalFilesystemAdapter $instance */ return $instance->macroCall($method, $parameters); } } @@ -16133,6 +16682,20 @@ { /** @var \Illuminate\Routing\UrlGenerator $instance */ return $instance->to($path, $extra, $secure); + } + /** + * Generate an absolute URL with the given query parameters. + * + * @param string $path + * @param array $query + * @param mixed $extra + * @param bool|null $secure + * @return string + * @static + */ public static function query($path, $query = [], $extra = [], $secure = null) + { + /** @var \Illuminate\Routing\UrlGenerator $instance */ + return $instance->query($path, $query, $extra, $secure); } /** * Generate a secure, absolute URL to the given path. @@ -16196,7 +16759,7 @@ /** * Create a signed route URL for a named route. * - * @param string $name + * @param \BackedEnum|string $name * @param mixed $parameters * @param \DateTimeInterface|\DateInterval|int|null $expiration * @param bool $absolute @@ -16211,7 +16774,7 @@ /** * Create a temporary signed route URL for a named route. * - * @param string $name + * @param \BackedEnum|string $name * @param \DateTimeInterface|\DateInterval|int $expiration * @param array $parameters * @param bool $absolute @@ -16274,11 +16837,11 @@ /** * Get the URL to a named route. * - * @param string $name + * @param \BackedEnum|string $name * @param mixed $parameters * @param bool $absolute * @return string - * @throws \Symfony\Component\Routing\Exception\RouteNotFoundException + * @throws \Symfony\Component\Routing\Exception\RouteNotFoundException|\InvalidArgumentException * @static */ public static function route($name, $parameters = [], $absolute = true) { @@ -16537,6 +17100,7 @@ * * @param string $name * @param object|callable $macro + * @param-closure-this static $macro * @return void * @static */ public static function macro($name, $macro) @@ -16930,11 +17494,22 @@ $instance->addLocation($location); } /** - * Add a new namespace to the loader. + * Prepend a location to the array of view locations. * - * @param string $namespace - * @param string|array $hints - * @return \Illuminate\View\Factory + * @param string $location + * @return void + * @static + */ public static function prependLocation($location) + { + /** @var \Illuminate\View\Factory $instance */ + $instance->prependLocation($location); + } + /** + * Add a new namespace to the loader. + * + * @param string $namespace + * @param string|array $hints + * @return \Illuminate\View\Factory * @static */ public static function addNamespace($namespace, $hints) { @@ -17118,6 +17693,7 @@ * * @param string $name * @param object|callable $macro + * @param-closure-this static $macro * @return void * @static */ public static function macro($name, $macro) @@ -17681,7 +18257,7 @@ /** * Resolve asset paths using the provided resolver. * - * @param callable|null $urlResolver + * @param callable|null $resolver * @return \Illuminate\Foundation\Vite * @static */ public static function createAssetPathsUsing($resolver) @@ -17753,6 +18329,50 @@ { /** @var \Illuminate\Foundation\Vite $instance */ return $instance->usePreloadTagAttributes($attributes); + } + /** + * Eagerly prefetch assets. + * + * @param int|null $concurrency + * @param string $event + * @return \Illuminate\Foundation\Vite + * @static + */ public static function prefetch($concurrency = null, $event = 'load') + { + /** @var \Illuminate\Foundation\Vite $instance */ + return $instance->prefetch($concurrency, $event); + } + /** + * Use the "waterfall" prefetching strategy. + * + * @return \Illuminate\Foundation\Vite + * @static + */ public static function useWaterfallPrefetching($concurrency = null) + { + /** @var \Illuminate\Foundation\Vite $instance */ + return $instance->useWaterfallPrefetching($concurrency); + } + /** + * Use the "aggressive" prefetching strategy. + * + * @return \Illuminate\Foundation\Vite + * @static + */ public static function useAggressivePrefetching() + { + /** @var \Illuminate\Foundation\Vite $instance */ + return $instance->useAggressivePrefetching(); + } + /** + * Set the prefetching strategy. + * + * @param \Illuminate\Foundation\'waterfall'|\Illuminate\Foundation\'aggressive'|null $strategy + * @param array $config + * @return \Illuminate\Foundation\Vite + * @static + */ public static function usePrefetchStrategy($strategy, $config = []) + { + /** @var \Illuminate\Foundation\Vite $instance */ + return $instance->usePrefetchStrategy($strategy, $config); } /** * Generate React refresh runtime script. @@ -17782,7 +18402,7 @@ * @param string $asset * @param string|null $buildDirectory * @return string - * @throws \Exception + * @throws \Illuminate\Foundation\ViteException * @static */ public static function content($asset, $buildDirectory = null) { @@ -17825,6 +18445,7 @@ * * @param string $name * @param object|callable $macro + * @param-closure-this static $macro * @return void * @static */ public static function macro($name, $macro) @@ -17865,6 +18486,500 @@ } } +namespace Barryvdh\Debugbar\Facades { + /** + * + * + * @method static void alert(mixed $message) + * @method static void critical(mixed $message) + * @method static void debug(mixed $message) + * @method static void emergency(mixed $message) + * @method static void error(mixed $message) + * @method static void info(mixed $message) + * @method static void log(mixed $message) + * @method static void notice(mixed $message) + * @method static void warning(mixed $message) + * @see \Barryvdh\Debugbar\LaravelDebugbar + */ class Debugbar { + /** + * Returns the HTTP driver + * + * If no http driver where defined, a PhpHttpDriver is automatically created + * + * @return \DebugBar\HttpDriverInterface + * @static + */ public static function getHttpDriver() + { + /** @var \Barryvdh\Debugbar\LaravelDebugbar $instance */ + return $instance->getHttpDriver(); + } + /** + * Enable the Debugbar and boot, if not already booted. + * + * @static + */ public static function enable() + { + /** @var \Barryvdh\Debugbar\LaravelDebugbar $instance */ + return $instance->enable(); + } + /** + * Boot the debugbar (add collectors, renderer and listener) + * + * @static + */ public static function boot() + { + /** @var \Barryvdh\Debugbar\LaravelDebugbar $instance */ + return $instance->boot(); + } + /** + * + * + * @static + */ public static function shouldCollect($name, $default = false) + { + /** @var \Barryvdh\Debugbar\LaravelDebugbar $instance */ + return $instance->shouldCollect($name, $default); + } + /** + * Adds a data collector + * + * @param \DebugBar\DataCollector\DataCollectorInterface $collector + * @throws DebugBarException + * @return \Barryvdh\Debugbar\LaravelDebugbar + * @static + */ public static function addCollector($collector) + { + /** @var \Barryvdh\Debugbar\LaravelDebugbar $instance */ + return $instance->addCollector($collector); + } + /** + * Handle silenced errors + * + * @param $level + * @param $message + * @param string $file + * @param int $line + * @param array $context + * @throws \ErrorException + * @static + */ public static function handleError($level, $message, $file = '', $line = 0, $context = []) + { + /** @var \Barryvdh\Debugbar\LaravelDebugbar $instance */ + return $instance->handleError($level, $message, $file, $line, $context); + } + /** + * Starts a measure + * + * @param string $name Internal name, used to stop the measure + * @param string $label Public name + * @param string|null $collector + * @static + */ public static function startMeasure($name, $label = null, $collector = null) + { + /** @var \Barryvdh\Debugbar\LaravelDebugbar $instance */ + return $instance->startMeasure($name, $label, $collector); + } + /** + * Stops a measure + * + * @param string $name + * @static + */ public static function stopMeasure($name) + { + /** @var \Barryvdh\Debugbar\LaravelDebugbar $instance */ + return $instance->stopMeasure($name); + } + /** + * Adds an exception to be profiled in the debug bar + * + * @param \Exception $e + * @deprecated in favor of addThrowable + * @static + */ public static function addException($e) + { + /** @var \Barryvdh\Debugbar\LaravelDebugbar $instance */ + return $instance->addException($e); + } + /** + * Adds an exception to be profiled in the debug bar + * + * @param \Throwable $e + * @static + */ public static function addThrowable($e) + { + /** @var \Barryvdh\Debugbar\LaravelDebugbar $instance */ + return $instance->addThrowable($e); + } + /** + * Returns a JavascriptRenderer for this instance + * + * @param string $baseUrl + * @param string $basePath + * @return \Barryvdh\Debugbar\JavascriptRenderer + * @static + */ public static function getJavascriptRenderer($baseUrl = null, $basePath = null) + { + /** @var \Barryvdh\Debugbar\LaravelDebugbar $instance */ + return $instance->getJavascriptRenderer($baseUrl, $basePath); + } + /** + * Modify the response and inject the debugbar (or data in headers) + * + * @param \Symfony\Component\HttpFoundation\Request $request + * @param \Symfony\Component\HttpFoundation\Response $response + * @return \Symfony\Component\HttpFoundation\Response + * @static + */ public static function modifyResponse($request, $response) + { + /** @var \Barryvdh\Debugbar\LaravelDebugbar $instance */ + return $instance->modifyResponse($request, $response); + } + /** + * Check if the Debugbar is enabled + * + * @return boolean + * @static + */ public static function isEnabled() + { + /** @var \Barryvdh\Debugbar\LaravelDebugbar $instance */ + return $instance->isEnabled(); + } + /** + * Collects the data from the collectors + * + * @return array + * @static + */ public static function collect() + { + /** @var \Barryvdh\Debugbar\LaravelDebugbar $instance */ + return $instance->collect(); + } + /** + * Injects the web debug toolbar into the given Response. + * + * @param \Symfony\Component\HttpFoundation\Response $response A Response instance + * Based on https://github.com/symfony/WebProfilerBundle/blob/master/EventListener/WebDebugToolbarListener.php + * @static + */ public static function injectDebugbar($response) + { + /** @var \Barryvdh\Debugbar\LaravelDebugbar $instance */ + return $instance->injectDebugbar($response); + } + /** + * Checks if there is stacked data in the session + * + * @return boolean + * @static + */ public static function hasStackedData() + { + /** @var \Barryvdh\Debugbar\LaravelDebugbar $instance */ + return $instance->hasStackedData(); + } + /** + * Returns the data stacked in the session + * + * @param boolean $delete Whether to delete the data in the session + * @return array + * @static + */ public static function getStackedData($delete = true) + { + /** @var \Barryvdh\Debugbar\LaravelDebugbar $instance */ + return $instance->getStackedData($delete); + } + /** + * Disable the Debugbar + * + * @static + */ public static function disable() + { + /** @var \Barryvdh\Debugbar\LaravelDebugbar $instance */ + return $instance->disable(); + } + /** + * Adds a measure + * + * @param string $label + * @param float $start + * @param float $end + * @param array|null $params + * @param string|null $collector + * @static + */ public static function addMeasure($label, $start, $end, $params = [], $collector = null) + { + /** @var \Barryvdh\Debugbar\LaravelDebugbar $instance */ + return $instance->addMeasure($label, $start, $end, $params, $collector); + } + /** + * Utility function to measure the execution of a Closure + * + * @param string $label + * @param \Closure $closure + * @param string|null $collector + * @return mixed + * @static + */ public static function measure($label, $closure, $collector = null) + { + /** @var \Barryvdh\Debugbar\LaravelDebugbar $instance */ + return $instance->measure($label, $closure, $collector); + } + /** + * Collect data in a CLI request + * + * @return array + * @static + */ public static function collectConsole() + { + /** @var \Barryvdh\Debugbar\LaravelDebugbar $instance */ + return $instance->collectConsole(); + } + /** + * Adds a message to the MessagesCollector + * + * A message can be anything from an object to a string + * + * @param mixed $message + * @param string $label + * @static + */ public static function addMessage($message, $label = 'info') + { + /** @var \Barryvdh\Debugbar\LaravelDebugbar $instance */ + return $instance->addMessage($message, $label); + } + /** + * Checks if a data collector has been added + * + * @param string $name + * @return boolean + * @static + */ public static function hasCollector($name) + { //Method inherited from \DebugBar\DebugBar + /** @var \Barryvdh\Debugbar\LaravelDebugbar $instance */ + return $instance->hasCollector($name); + } + /** + * Returns a data collector + * + * @param string $name + * @return \DebugBar\DataCollector\DataCollectorInterface + * @throws DebugBarException + * @static + */ public static function getCollector($name) + { //Method inherited from \DebugBar\DebugBar + /** @var \Barryvdh\Debugbar\LaravelDebugbar $instance */ + return $instance->getCollector($name); + } + /** + * Returns an array of all data collectors + * + * @return \DebugBar\array[DataCollectorInterface] + * @static + */ public static function getCollectors() + { //Method inherited from \DebugBar\DebugBar + /** @var \Barryvdh\Debugbar\LaravelDebugbar $instance */ + return $instance->getCollectors(); + } + /** + * Sets the request id generator + * + * @param \DebugBar\RequestIdGeneratorInterface $generator + * @return \Barryvdh\Debugbar\LaravelDebugbar + * @static + */ public static function setRequestIdGenerator($generator) + { //Method inherited from \DebugBar\DebugBar + /** @var \Barryvdh\Debugbar\LaravelDebugbar $instance */ + return $instance->setRequestIdGenerator($generator); + } + /** + * + * + * @return \DebugBar\RequestIdGeneratorInterface + * @static + */ public static function getRequestIdGenerator() + { //Method inherited from \DebugBar\DebugBar + /** @var \Barryvdh\Debugbar\LaravelDebugbar $instance */ + return $instance->getRequestIdGenerator(); + } + /** + * Returns the id of the current request + * + * @return string + * @static + */ public static function getCurrentRequestId() + { //Method inherited from \DebugBar\DebugBar + /** @var \Barryvdh\Debugbar\LaravelDebugbar $instance */ + return $instance->getCurrentRequestId(); + } + /** + * Sets the storage backend to use to store the collected data + * + * @param \DebugBar\StorageInterface $storage + * @return \Barryvdh\Debugbar\LaravelDebugbar + * @static + */ public static function setStorage($storage = null) + { //Method inherited from \DebugBar\DebugBar + /** @var \Barryvdh\Debugbar\LaravelDebugbar $instance */ + return $instance->setStorage($storage); + } + /** + * + * + * @return \DebugBar\StorageInterface + * @static + */ public static function getStorage() + { //Method inherited from \DebugBar\DebugBar + /** @var \Barryvdh\Debugbar\LaravelDebugbar $instance */ + return $instance->getStorage(); + } + /** + * Checks if the data will be persisted + * + * @return boolean + * @static + */ public static function isDataPersisted() + { //Method inherited from \DebugBar\DebugBar + /** @var \Barryvdh\Debugbar\LaravelDebugbar $instance */ + return $instance->isDataPersisted(); + } + /** + * Sets the HTTP driver + * + * @param \DebugBar\HttpDriverInterface $driver + * @return \Barryvdh\Debugbar\LaravelDebugbar + * @static + */ public static function setHttpDriver($driver) + { //Method inherited from \DebugBar\DebugBar + /** @var \Barryvdh\Debugbar\LaravelDebugbar $instance */ + return $instance->setHttpDriver($driver); + } + /** + * Returns collected data + * + * Will collect the data if none have been collected yet + * + * @return array + * @static + */ public static function getData() + { //Method inherited from \DebugBar\DebugBar + /** @var \Barryvdh\Debugbar\LaravelDebugbar $instance */ + return $instance->getData(); + } + /** + * Returns an array of HTTP headers containing the data + * + * @param string $headerName + * @param integer $maxHeaderLength + * @return array + * @static + */ public static function getDataAsHeaders($headerName = 'phpdebugbar', $maxHeaderLength = 4096, $maxTotalHeaderLength = 250000) + { //Method inherited from \DebugBar\DebugBar + /** @var \Barryvdh\Debugbar\LaravelDebugbar $instance */ + return $instance->getDataAsHeaders($headerName, $maxHeaderLength, $maxTotalHeaderLength); + } + /** + * Sends the data through the HTTP headers + * + * @param bool $useOpenHandler + * @param string $headerName + * @param integer $maxHeaderLength + * @return \Barryvdh\Debugbar\LaravelDebugbar + * @static + */ public static function sendDataInHeaders($useOpenHandler = null, $headerName = 'phpdebugbar', $maxHeaderLength = 4096) + { //Method inherited from \DebugBar\DebugBar + /** @var \Barryvdh\Debugbar\LaravelDebugbar $instance */ + return $instance->sendDataInHeaders($useOpenHandler, $headerName, $maxHeaderLength); + } + /** + * Stacks the data in the session for later rendering + * + * @static + */ public static function stackData() + { //Method inherited from \DebugBar\DebugBar + /** @var \Barryvdh\Debugbar\LaravelDebugbar $instance */ + return $instance->stackData(); + } + /** + * Sets the key to use in the $_SESSION array + * + * @param string $ns + * @return \Barryvdh\Debugbar\LaravelDebugbar + * @static + */ public static function setStackDataSessionNamespace($ns) + { //Method inherited from \DebugBar\DebugBar + /** @var \Barryvdh\Debugbar\LaravelDebugbar $instance */ + return $instance->setStackDataSessionNamespace($ns); + } + /** + * Returns the key used in the $_SESSION array + * + * @return string + * @static + */ public static function getStackDataSessionNamespace() + { //Method inherited from \DebugBar\DebugBar + /** @var \Barryvdh\Debugbar\LaravelDebugbar $instance */ + return $instance->getStackDataSessionNamespace(); + } + /** + * Sets whether to only use the session to store stacked data even + * if a storage is enabled + * + * @param boolean $enabled + * @return \Barryvdh\Debugbar\LaravelDebugbar + * @static + */ public static function setStackAlwaysUseSessionStorage($enabled = true) + { //Method inherited from \DebugBar\DebugBar + /** @var \Barryvdh\Debugbar\LaravelDebugbar $instance */ + return $instance->setStackAlwaysUseSessionStorage($enabled); + } + /** + * Checks if the session is always used to store stacked data + * even if a storage is enabled + * + * @return boolean + * @static + */ public static function isStackAlwaysUseSessionStorage() + { //Method inherited from \DebugBar\DebugBar + /** @var \Barryvdh\Debugbar\LaravelDebugbar $instance */ + return $instance->isStackAlwaysUseSessionStorage(); + } + /** + * + * + * @static + */ public static function offsetSet($key, $value) + { //Method inherited from \DebugBar\DebugBar + /** @var \Barryvdh\Debugbar\LaravelDebugbar $instance */ + return $instance->offsetSet($key, $value); + } + /** + * + * + * @static + */ public static function offsetGet($key) + { //Method inherited from \DebugBar\DebugBar + /** @var \Barryvdh\Debugbar\LaravelDebugbar $instance */ + return $instance->offsetGet($key); + } + /** + * + * + * @static + */ public static function offsetExists($key) + { //Method inherited from \DebugBar\DebugBar + /** @var \Barryvdh\Debugbar\LaravelDebugbar $instance */ + return $instance->offsetExists($key); + } + /** + * + * + * @static + */ public static function offsetUnset($key) + { //Method inherited from \DebugBar\DebugBar + /** @var \Barryvdh\Debugbar\LaravelDebugbar $instance */ + return $instance->offsetUnset($key); + } + } + } + namespace Spatie\LaravelIgnition\Facades { /** * @@ -17974,10 +19089,10 @@ * * * @static - */ public static function withStackFrameArguments($withStackFrameArguments = true) + */ public static function withStackFrameArguments($withStackFrameArguments = true, $forcePHPIniSetting = false) { /** @var \Spatie\FlareClient\Flare $instance */ - return $instance->withStackFrameArguments($withStackFrameArguments); + return $instance->withStackFrameArguments($withStackFrameArguments, $forcePHPIniSetting); } /** * @@ -18038,10 +19153,10 @@ * * * @static - */ public static function registerErrorHandler() + */ public static function registerErrorHandler($errorLevels = null) { /** @var \Spatie\FlareClient\Flare $instance */ - return $instance->registerErrorHandler(); + return $instance->registerErrorHandler($errorLevels); } /** * @@ -18109,10 +19224,19 @@ * * * @static - */ public static function report($throwable, $callback = null, $report = null) + */ public static function report($throwable, $callback = null, $report = null, $handled = null) + { + /** @var \Spatie\FlareClient\Flare $instance */ + return $instance->report($throwable, $callback, $report, $handled); + } + /** + * + * + * @static + */ public static function reportHandled($throwable) { /** @var \Spatie\FlareClient\Flare $instance */ - return $instance->report($throwable, $callback, $report); + return $instance->reportHandled($throwable); } /** * @@ -18233,6 +19357,27 @@ } } +namespace Illuminate\Support { + /** + * + * + * @template TKey of array-key + * @template-covariant TValue + * @implements \ArrayAccess + * @implements \Illuminate\Support\Enumerable + */ class Collection { + /** + * + * + * @see \Barryvdh\Debugbar\ServiceProvider::register() + * @static + */ public static function debug() + { + return \Illuminate\Support\Collection::debug(); + } + } + } + namespace Illuminate\Http { /** * @@ -18348,6 +19493,31 @@ return \Illuminate\Routing\Router::emailVerification(); } } + /** + * + * + */ class Route { + /** + * + * + * @see \Spatie\Permission\PermissionServiceProvider::registerMacroHelpers() + * @param mixed $roles + * @static + */ public static function role($roles = []) + { + return \Illuminate\Routing\Route::role($roles); + } + /** + * + * + * @see \Spatie\Permission\PermissionServiceProvider::registerMacroHelpers() + * @param mixed $permissions + * @static + */ public static function permission($permissions = []) + { + return \Illuminate\Routing\Route::permission($permissions); + } + } } @@ -18360,6 +19530,7 @@ class Blade extends \Illuminate\Support\Facades\Blade {} class Broadcast extends \Illuminate\Support\Facades\Broadcast {} class Bus extends \Illuminate\Support\Facades\Bus {} class Cache extends \Illuminate\Support\Facades\Cache {} + class Concurrency extends \Illuminate\Support\Facades\Concurrency {} class Config extends \Illuminate\Support\Facades\Config {} class Context extends \Illuminate\Support\Facades\Context {} class Cookie extends \Illuminate\Support\Facades\Cookie {} @@ -18370,7 +19541,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { * Create and return an un-saved model instance. * * @param array $attributes - * @return \Illuminate\Database\Eloquent\Model|static + * @return \Illuminate\Database\Eloquent\TModel * @static */ public static function make($attributes = []) { @@ -18446,7 +19617,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Add a basic where clause to the query. * - * @param \Closure|string|array|\Illuminate\Contracts\Database\Query\Expression $column + * @param \Illuminate\Database\Eloquent\(\Closure(static): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column * @param mixed $operator * @param mixed $value * @param string $boolean @@ -18460,11 +19631,11 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Add a basic where clause to the query, and return the first result. * - * @param \Closure|string|array|\Illuminate\Contracts\Database\Query\Expression $column + * @param \Illuminate\Database\Eloquent\(\Closure(static): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column * @param mixed $operator * @param mixed $value * @param string $boolean - * @return \Illuminate\Database\Eloquent\Model|static|null + * @return \Illuminate\Database\Eloquent\TModel|null * @static */ public static function firstWhere($column, $operator = null, $value = null, $boolean = 'and') { @@ -18474,7 +19645,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Add an "or where" clause to the query. * - * @param \Closure|array|string|\Illuminate\Contracts\Database\Query\Expression $column + * @param \Illuminate\Database\Eloquent\(\Closure(static): mixed)|array|string|\Illuminate\Contracts\Database\Query\Expression $column * @param mixed $operator * @param mixed $value * @return \Illuminate\Database\Eloquent\Builder|static @@ -18487,7 +19658,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Add a basic "where not" clause to the query. * - * @param \Closure|string|array|\Illuminate\Contracts\Database\Query\Expression $column + * @param \Illuminate\Database\Eloquent\(\Closure(static): mixed)|string|array|\Illuminate\Contracts\Database\Query\Expression $column * @param mixed $operator * @param mixed $value * @param string $boolean @@ -18501,7 +19672,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Add an "or where not" clause to the query. * - * @param \Closure|array|string|\Illuminate\Contracts\Database\Query\Expression $column + * @param \Illuminate\Database\Eloquent\(\Closure(static): mixed)|array|string|\Illuminate\Contracts\Database\Query\Expression $column * @param mixed $operator * @param mixed $value * @return \Illuminate\Database\Eloquent\Builder|static @@ -18537,7 +19708,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { * Create a collection of models from plain arrays. * * @param array $items - * @return \Illuminate\Database\Eloquent\Collection + * @return \Illuminate\Database\Eloquent\Collection * @static */ public static function hydrate($items) { @@ -18549,7 +19720,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { * * @param string $query * @param array $bindings - * @return \Illuminate\Database\Eloquent\Collection + * @return \Illuminate\Database\Eloquent\Collection * @static */ public static function fromQuery($query, $bindings = []) { @@ -18561,7 +19732,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { * * @param mixed $id * @param array|string $columns - * @return \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Collection|static[]|static|null + * @return \Illuminate\Database\Eloquent\($id is (\Illuminate\Contracts\Support\Arrayable|array) ? \Illuminate\Database\Eloquent\Collection : TModel|null) * @static */ public static function find($id, $columns = []) { @@ -18573,7 +19744,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { * * @param \Illuminate\Contracts\Support\Arrayable|array $ids * @param array|string $columns - * @return \Illuminate\Database\Eloquent\Collection + * @return \Illuminate\Database\Eloquent\Collection * @static */ public static function findMany($ids, $columns = []) { @@ -18585,8 +19756,8 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { * * @param mixed $id * @param array|string $columns - * @return \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Collection|static|static[] - * @throws \Illuminate\Database\Eloquent\ModelNotFoundException<\Illuminate\Database\Eloquent\Model> + * @return \Illuminate\Database\Eloquent\($id is (\Illuminate\Contracts\Support\Arrayable|array) ? \Illuminate\Database\Eloquent\Collection : TModel) + * @throws \Illuminate\Database\Eloquent\ModelNotFoundException * @static */ public static function findOrFail($id, $columns = []) { @@ -18598,7 +19769,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { * * @param mixed $id * @param array|string $columns - * @return \Illuminate\Database\Eloquent\Model|static + * @return \Illuminate\Database\Eloquent\($id is (\Illuminate\Contracts\Support\Arrayable|array) ? \Illuminate\Database\Eloquent\Collection : TModel) * @static */ public static function findOrNew($id, $columns = []) { @@ -18608,10 +19779,14 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Find a model by its primary key or call a callback. * + * @template TValue * @param mixed $id - * @param \Closure|array|string $columns - * @param \Closure|null $callback - * @return \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Collection|static[]|static|mixed + * @param \Illuminate\Database\Eloquent\(\Closure(): TValue)|list|string $columns + * @param \Illuminate\Database\Eloquent\(\Closure(): TValue)|null $callback + * @return \Illuminate\Database\Eloquent\( $id is (\Illuminate\Contracts\Support\Arrayable|array) + * ? \Illuminate\Database\Eloquent\Collection + * : TModel|TValue + * ) * @static */ public static function findOr($id, $columns = [], $callback = null) { @@ -18623,7 +19798,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { * * @param array $attributes * @param array $values - * @return \Illuminate\Database\Eloquent\Model|static + * @return \Illuminate\Database\Eloquent\TModel * @static */ public static function firstOrNew($attributes = [], $values = []) { @@ -18635,7 +19810,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { * * @param array $attributes * @param array $values - * @return \Illuminate\Database\Eloquent\Model|static + * @return \Illuminate\Database\Eloquent\TModel * @static */ public static function firstOrCreate($attributes = [], $values = []) { @@ -18647,7 +19822,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { * * @param array $attributes * @param array $values - * @return \Illuminate\Database\Eloquent\Model|static + * @return \Illuminate\Database\Eloquent\TModel * @static */ public static function createOrFirst($attributes = [], $values = []) { @@ -18659,7 +19834,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { * * @param array $attributes * @param array $values - * @return \Illuminate\Database\Eloquent\Model|static + * @return \Illuminate\Database\Eloquent\TModel * @static */ public static function updateOrCreate($attributes, $values = []) { @@ -18670,8 +19845,8 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { * Execute the query and get the first result or throw an exception. * * @param array|string $columns - * @return \Illuminate\Database\Eloquent\Model|static - * @throws \Illuminate\Database\Eloquent\ModelNotFoundException<\Illuminate\Database\Eloquent\Model> + * @return \Illuminate\Database\Eloquent\TModel + * @throws \Illuminate\Database\Eloquent\ModelNotFoundException * @static */ public static function firstOrFail($columns = []) { @@ -18681,9 +19856,10 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Execute the query and get the first result or call a callback. * - * @param \Closure|array|string $columns - * @param \Closure|null $callback - * @return \Illuminate\Database\Eloquent\Model|static|mixed + * @template TValue + * @param \Illuminate\Database\Eloquent\(\Closure(): TValue)|list $columns + * @param \Illuminate\Database\Eloquent\(\Closure(): TValue)|null $callback + * @return \Illuminate\Database\Eloquent\TModel|\Illuminate\Database\Eloquent\TValue * @static */ public static function firstOr($columns = [], $callback = null) { @@ -18694,8 +19870,8 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { * Execute the query and get the first result if it's the sole matching record. * * @param array|string $columns - * @return \Illuminate\Database\Eloquent\Model - * @throws \Illuminate\Database\Eloquent\ModelNotFoundException<\Illuminate\Database\Eloquent\Model> + * @return \Illuminate\Database\Eloquent\TModel + * @throws \Illuminate\Database\Eloquent\ModelNotFoundException * @throws \Illuminate\Database\MultipleRecordsFoundException * @static */ public static function sole($columns = []) @@ -18719,7 +19895,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { * * @param string|\Illuminate\Contracts\Database\Query\Expression $column * @return mixed - * @throws \Illuminate\Database\Eloquent\ModelNotFoundException<\Illuminate\Database\Eloquent\Model> + * @throws \Illuminate\Database\Eloquent\ModelNotFoundException * @throws \Illuminate\Database\MultipleRecordsFoundException * @static */ public static function soleValue($column) @@ -18732,7 +19908,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { * * @param string|\Illuminate\Contracts\Database\Query\Expression $column * @return mixed - * @throws \Illuminate\Database\Eloquent\ModelNotFoundException<\Illuminate\Database\Eloquent\Model> + * @throws \Illuminate\Database\Eloquent\ModelNotFoundException * @static */ public static function valueOrFail($column) { @@ -18743,7 +19919,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { * Execute the query as a "select" statement. * * @param array|string $columns - * @return \Illuminate\Database\Eloquent\Collection|static[] + * @return \Illuminate\Database\Eloquent\Collection * @static */ public static function get($columns = []) { @@ -18754,7 +19930,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { * Get the hydrated models without eager loading. * * @param array|string $columns - * @return \Illuminate\Database\Eloquent\Model[]|static[] + * @return array * @static */ public static function getModels($columns = []) { @@ -18764,18 +19940,40 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Eager load the relationships for the models. * - * @param array $models - * @return array + * @param array $models + * @return array * @static */ public static function eagerLoadRelations($models) { /** @var \Illuminate\Database\Eloquent\Builder $instance */ return $instance->eagerLoadRelations($models); + } + /** + * Register a closure to be invoked after the query is executed. + * + * @param \Closure $callback + * @return \Illuminate\Database\Eloquent\Builder|static + * @static + */ public static function afterQuery($callback) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->afterQuery($callback); + } + /** + * Invoke the "after query" modification callbacks. + * + * @param mixed $result + * @return mixed + * @static + */ public static function applyAfterQueryCallbacks($result) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->applyAfterQueryCallbacks($result); } /** * Get a lazy collection for the given query. * - * @return \Illuminate\Support\LazyCollection + * @return \Illuminate\Support\LazyCollection * @static */ public static function cursor() { @@ -18787,7 +19985,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { * * @param string|\Illuminate\Contracts\Database\Query\Expression $column * @param string|null $key - * @return \Illuminate\Support\Collection + * @return \Illuminate\Support\Collection * @static */ public static function pluck($column, $key = null) { @@ -18842,7 +20040,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { * Save a new model and return the instance. * * @param array $attributes - * @return \Illuminate\Database\Eloquent\Model|$this + * @return \Illuminate\Database\Eloquent\TModel * @static */ public static function create($attributes = []) { @@ -18853,7 +20051,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { * Save a new model and return the instance. Allow mass-assignment. * * @param array $attributes - * @return \Illuminate\Database\Eloquent\Model|$this + * @return \Illuminate\Database\Eloquent\TModel * @static */ public static function forceCreate($attributes) { @@ -18864,7 +20062,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { * Save a new model instance with mass assignment without raising model events. * * @param array $attributes - * @return \Illuminate\Database\Eloquent\Model|$this + * @return \Illuminate\Database\Eloquent\TModel * @static */ public static function forceCreateQuietly($attributes = []) { @@ -18930,7 +20128,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Set the relationships that should be eager loaded while removing any previously added eager loading specifications. * - * @param mixed $relations + * @param \Illuminate\Database\Eloquent\array): mixed)|string>|string $relations * @return \Illuminate\Database\Eloquent\Builder|static * @static */ public static function withOnly($relations) @@ -18942,7 +20140,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { * Create a new instance of the model being queried. * * @param array $attributes - * @return \Illuminate\Database\Eloquent\Model|static + * @return \Illuminate\Database\Eloquent\TModel * @static */ public static function newModelInstance($attributes = []) { @@ -19048,7 +20246,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Get the model instance being queried. * - * @return \Illuminate\Database\Eloquent\Model|static + * @return \Illuminate\Database\Eloquent\TModel * @static */ public static function getModel() { @@ -19058,8 +20256,9 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Set a model instance for the model being queried. * - * @param \Illuminate\Database\Eloquent\Model $model - * @return \Illuminate\Database\Eloquent\Builder|static + * @template TModelNew of \Illuminate\Database\Eloquent\Model + * @param \Illuminate\Database\Eloquent\TModelNew $model + * @return \Illuminate\Database\Eloquent\static * @static */ public static function setModel($model) { @@ -19122,7 +20321,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { * Chunk the results of the query. * * @param int $count - * @param callable $callback + * @param \Illuminate\Database\Eloquent\callable(\Illuminate\Support\Collection, int): mixed $callback * @return bool * @static */ public static function chunk($count, $callback) @@ -19133,9 +20332,10 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Run a map over each item while chunking. * - * @param callable $callback + * @template TReturn + * @param \Illuminate\Database\Eloquent\callable(TValue): TReturn $callback * @param int $count - * @return \Illuminate\Support\Collection + * @return \Illuminate\Support\Collection * @static */ public static function chunkMap($callback, $count = 1000) { @@ -19145,7 +20345,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Execute a callback over each item while chunking. * - * @param callable $callback + * @param \Illuminate\Database\Eloquent\callable(TValue, int): mixed $callback * @param int $count * @return bool * @throws \RuntimeException @@ -19159,7 +20359,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { * Chunk the results of a query by comparing IDs. * * @param int $count - * @param callable $callback + * @param \Illuminate\Database\Eloquent\callable(\Illuminate\Support\Collection, int): mixed $callback * @param string|null $column * @param string|null $alias * @return bool @@ -19173,7 +20373,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { * Chunk the results of a query by comparing IDs in descending order. * * @param int $count - * @param callable $callback + * @param \Illuminate\Database\Eloquent\callable(\Illuminate\Support\Collection, int): mixed $callback * @param string|null $column * @param string|null $alias * @return bool @@ -19187,11 +20387,12 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { * Chunk the results of a query by comparing IDs in a given order. * * @param int $count - * @param callable $callback + * @param \Illuminate\Database\Eloquent\callable(\Illuminate\Support\Collection, int): mixed $callback * @param string|null $column * @param string|null $alias * @param bool $descending * @return bool + * @throws \RuntimeException * @static */ public static function orderedChunkById($count, $callback, $column = null, $alias = null, $descending = false) { @@ -19201,7 +20402,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Execute a callback over each item while chunking by ID. * - * @param callable $callback + * @param \Illuminate\Database\Eloquent\callable(TValue, int): mixed $callback * @param int $count * @param string|null $column * @param string|null $alias @@ -19256,7 +20457,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { * Execute the query and get the first result. * * @param array|string $columns - * @return \Illuminate\Database\Eloquent\Model|object|static|null + * @return \Illuminate\Database\Eloquent\TValue|null * @static */ public static function first($columns = []) { @@ -19267,7 +20468,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { * Execute the query and get the first result if it's the sole matching record. * * @param array|string $columns - * @return \Illuminate\Database\Eloquent\Model|object|static|null + * @return \Illuminate\Database\Eloquent\TValue * @throws \Illuminate\Database\RecordsNotFoundException * @throws \Illuminate\Database\MultipleRecordsFoundException * @static @@ -19279,7 +20480,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Pass the query to a given callback. * - * @param callable $callback + * @param \Illuminate\Database\Eloquent\callable($this): mixed $callback * @return \Illuminate\Database\Eloquent\Builder|static * @static */ public static function tap($callback) @@ -19320,7 +20521,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Add a relationship count / exists condition to the query. * - * @param \Illuminate\Database\Eloquent\Relations\Relation|string $relation + * @param \Illuminate\Database\Eloquent\Relations\Relation<*, *, *>|string $relation * @param string $operator * @param int $count * @param string $boolean @@ -19336,7 +20537,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Add a relationship count / exists condition to the query with an "or". * - * @param string $relation + * @param \Illuminate\Database\Eloquent\Relations\Relation<*, *, *>|string $relation * @param string $operator * @param int $count * @return \Illuminate\Database\Eloquent\Builder|static @@ -19349,7 +20550,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Add a relationship count / exists condition to the query. * - * @param string $relation + * @param \Illuminate\Database\Eloquent\Relations\Relation<*, *, *>|string $relation * @param string $boolean * @param \Closure|null $callback * @return \Illuminate\Database\Eloquent\Builder|static @@ -19362,7 +20563,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Add a relationship count / exists condition to the query with an "or". * - * @param string $relation + * @param \Illuminate\Database\Eloquent\Relations\Relation<*, *, *>|string $relation * @return \Illuminate\Database\Eloquent\Builder|static * @static */ public static function orDoesntHave($relation) @@ -19373,7 +20574,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Add a relationship count / exists condition to the query with where clauses. * - * @param string $relation + * @param \Illuminate\Database\Eloquent\Relations\Relation<*, *, *>|string $relation * @param \Closure|null $callback * @param string $operator * @param int $count @@ -19389,7 +20590,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { * * Also load the relationship with same condition. * - * @param string $relation + * @param \Illuminate\Database\Eloquent\Relations\Relation<*, *, *>|string $relation * @param \Closure|null $callback * @param string $operator * @param int $count @@ -19403,7 +20604,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Add a relationship count / exists condition to the query with where clauses and an "or". * - * @param string $relation + * @param \Illuminate\Database\Eloquent\Relations\Relation<*, *, *>|string $relation * @param \Closure|null $callback * @param string $operator * @param int $count @@ -19417,7 +20618,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Add a relationship count / exists condition to the query with where clauses. * - * @param string $relation + * @param \Illuminate\Database\Eloquent\Relations\Relation<*, *, *>|string $relation * @param \Closure|null $callback * @return \Illuminate\Database\Eloquent\Builder|static * @static @@ -19429,7 +20630,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Add a relationship count / exists condition to the query with where clauses and an "or". * - * @param string $relation + * @param \Illuminate\Database\Eloquent\Relations\Relation<*, *, *>|string $relation * @param \Closure|null $callback * @return \Illuminate\Database\Eloquent\Builder|static * @static @@ -19441,7 +20642,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Add a polymorphic relationship count / exists condition to the query. * - * @param \Illuminate\Database\Eloquent\Relations\MorphTo|string $relation + * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation * @param string|array $types * @param string $operator * @param int $count @@ -19457,7 +20658,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Add a polymorphic relationship count / exists condition to the query with an "or". * - * @param \Illuminate\Database\Eloquent\Relations\MorphTo|string $relation + * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation * @param string|array $types * @param string $operator * @param int $count @@ -19471,7 +20672,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Add a polymorphic relationship count / exists condition to the query. * - * @param \Illuminate\Database\Eloquent\Relations\MorphTo|string $relation + * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation * @param string|array $types * @param string $boolean * @param \Closure|null $callback @@ -19485,7 +20686,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Add a polymorphic relationship count / exists condition to the query with an "or". * - * @param \Illuminate\Database\Eloquent\Relations\MorphTo|string $relation + * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation * @param string|array $types * @return \Illuminate\Database\Eloquent\Builder|static * @static @@ -19497,7 +20698,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Add a polymorphic relationship count / exists condition to the query with where clauses. * - * @param \Illuminate\Database\Eloquent\Relations\MorphTo|string $relation + * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation * @param string|array $types * @param \Closure|null $callback * @param string $operator @@ -19512,7 +20713,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Add a polymorphic relationship count / exists condition to the query with where clauses and an "or". * - * @param \Illuminate\Database\Eloquent\Relations\MorphTo|string $relation + * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation * @param string|array $types * @param \Closure|null $callback * @param string $operator @@ -19527,7 +20728,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Add a polymorphic relationship count / exists condition to the query with where clauses. * - * @param \Illuminate\Database\Eloquent\Relations\MorphTo|string $relation + * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation * @param string|array $types * @param \Closure|null $callback * @return \Illuminate\Database\Eloquent\Builder|static @@ -19540,7 +20741,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Add a polymorphic relationship count / exists condition to the query with where clauses and an "or". * - * @param \Illuminate\Database\Eloquent\Relations\MorphTo|string $relation + * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation * @param string|array $types * @param \Closure|null $callback * @return \Illuminate\Database\Eloquent\Builder|static @@ -19553,7 +20754,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Add a basic where clause to a relationship query. * - * @param string $relation + * @param \Illuminate\Database\Eloquent\Relations\Relation<*, *, *>|string $relation * @param \Closure|string|array|\Illuminate\Contracts\Database\Query\Expression $column * @param mixed $operator * @param mixed $value @@ -19567,7 +20768,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Add an "or where" clause to a relationship query. * - * @param string $relation + * @param \Illuminate\Database\Eloquent\Relations\Relation<*, *, *>|string $relation * @param \Closure|string|array|\Illuminate\Contracts\Database\Query\Expression $column * @param mixed $operator * @param mixed $value @@ -19581,7 +20782,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Add a polymorphic relationship condition to the query with a where clause. * - * @param \Illuminate\Database\Eloquent\Relations\MorphTo|string $relation + * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation * @param string|array $types * @param \Closure|string|array|\Illuminate\Contracts\Database\Query\Expression $column * @param mixed $operator @@ -19596,7 +20797,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Add a polymorphic relationship condition to the query with an "or where" clause. * - * @param \Illuminate\Database\Eloquent\Relations\MorphTo|string $relation + * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation * @param string|array $types * @param \Closure|string|array|\Illuminate\Contracts\Database\Query\Expression $column * @param mixed $operator @@ -19611,7 +20812,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Add a morph-to relationship condition to the query. * - * @param \Illuminate\Database\Eloquent\Relations\MorphTo|string $relation + * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation * @param \Illuminate\Database\Eloquent\Model|string|null $model * @return \Illuminate\Database\Eloquent\Builder|static * @static @@ -19623,7 +20824,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Add a not morph-to relationship condition to the query. * - * @param \Illuminate\Database\Eloquent\Relations\MorphTo|string $relation + * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation * @param \Illuminate\Database\Eloquent\Model|string $model * @return \Illuminate\Database\Eloquent\Builder|static * @static @@ -19635,7 +20836,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Add a morph-to relationship condition to the query with an "or where" clause. * - * @param \Illuminate\Database\Eloquent\Relations\MorphTo|string $relation + * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation * @param \Illuminate\Database\Eloquent\Model|string|null $model * @return \Illuminate\Database\Eloquent\Builder|static * @static @@ -19647,7 +20848,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Add a not morph-to relationship condition to the query with an "or where" clause. * - * @param \Illuminate\Database\Eloquent\Relations\MorphTo|string $relation + * @param \Illuminate\Database\Eloquent\Relations\MorphTo<*, *>|string $relation * @param \Illuminate\Database\Eloquent\Model|string $model * @return \Illuminate\Database\Eloquent\Builder|static * @static @@ -19659,7 +20860,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Add a "belongs to" relationship where clause to the query. * - * @param \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Collection<\Illuminate\Database\Eloquent\Model> $related + * @param \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Collection $related * @param string|null $relationshipName * @param string $boolean * @return \Illuminate\Database\Eloquent\Builder|static @@ -19769,7 +20970,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Merge the where constraints from another query to the current query. * - * @param \Illuminate\Database\Eloquent\Builder $from + * @param \Illuminate\Database\Eloquent\Builder<*> $from * @return \Illuminate\Database\Eloquent\Builder|static * @static */ public static function mergeConstraintsFrom($from) @@ -19791,7 +20992,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Add a subselect expression to the query. * - * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder|string $query + * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query * @param string $as * @return \Illuminate\Database\Query\Builder * @throws \InvalidArgumentException @@ -19816,7 +21017,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Makes "from" fetch from a subquery. * - * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder|string $query + * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query * @param string $as * @return \Illuminate\Database\Query\Builder * @throws \InvalidArgumentException @@ -19862,7 +21063,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Set the table which the query is targeting. * - * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder|string $table + * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|\Illuminate\Contracts\Database\Query\Expression|string $table * @param string|null $as * @return \Illuminate\Database\Query\Builder * @static @@ -19938,7 +21139,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Add a subquery join clause to the query. * - * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder|string $query + * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query * @param string $as * @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first * @param string|null $operator @@ -19956,7 +21157,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Add a lateral join clause to the query. * - * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder|string $query + * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query * @param string $as * @param string $type * @return \Illuminate\Database\Query\Builder @@ -19969,7 +21170,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Add a lateral left join to the query. * - * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder|string $query + * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query * @param string $as * @return \Illuminate\Database\Query\Builder * @static @@ -20009,7 +21210,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Add a subquery left join to the query. * - * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder|string $query + * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query * @param string $as * @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first * @param string|null $operator @@ -20052,7 +21253,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Add a subquery right join to the query. * - * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder|string $query + * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query * @param string $as * @param \Closure|\Illuminate\Contracts\Database\Query\Expression|string $first * @param string|null $operator @@ -20081,7 +21282,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Add a subquery cross join to the query. * - * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder|string $query + * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query * @param string $as * @return \Illuminate\Database\Query\Builder * @static @@ -20167,6 +21368,61 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { { /** @var \Illuminate\Database\Query\Builder $instance */ return $instance->orWhereRaw($sql, $bindings); + } + /** + * Add a "where like" clause to the query. + * + * @param \Illuminate\Contracts\Database\Query\Expression|string $column + * @param string $value + * @param bool $caseSensitive + * @param string $boolean + * @param bool $not + * @return \Illuminate\Database\Query\Builder + * @static + */ public static function whereLike($column, $value, $caseSensitive = false, $boolean = 'and', $not = false) + { + /** @var \Illuminate\Database\Query\Builder $instance */ + return $instance->whereLike($column, $value, $caseSensitive, $boolean, $not); + } + /** + * Add an "or where like" clause to the query. + * + * @param \Illuminate\Contracts\Database\Query\Expression|string $column + * @param string $value + * @param bool $caseSensitive + * @return \Illuminate\Database\Query\Builder + * @static + */ public static function orWhereLike($column, $value, $caseSensitive = false) + { + /** @var \Illuminate\Database\Query\Builder $instance */ + return $instance->orWhereLike($column, $value, $caseSensitive); + } + /** + * Add a "where not like" clause to the query. + * + * @param \Illuminate\Contracts\Database\Query\Expression|string $column + * @param string $value + * @param bool $caseSensitive + * @param string $boolean + * @return \Illuminate\Database\Query\Builder + * @static + */ public static function whereNotLike($column, $value, $caseSensitive = false, $boolean = 'and') + { + /** @var \Illuminate\Database\Query\Builder $instance */ + return $instance->whereNotLike($column, $value, $caseSensitive, $boolean); + } + /** + * Add an "or where not like" clause to the query. + * + * @param \Illuminate\Contracts\Database\Query\Expression|string $column + * @param string $value + * @param bool $caseSensitive + * @return \Illuminate\Database\Query\Builder + * @static + */ public static function orWhereNotLike($column, $value, $caseSensitive = false) + { + /** @var \Illuminate\Database\Query\Builder $instance */ + return $instance->orWhereNotLike($column, $value, $caseSensitive); } /** * Add a "where in" clause to the query. @@ -20591,7 +21847,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Add an exists clause to the query. * - * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder $callback + * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*> $callback * @param string $boolean * @param bool $not * @return \Illuminate\Database\Query\Builder @@ -20604,7 +21860,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Add an or exists clause to the query. * - * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder $callback + * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*> $callback * @param bool $not * @return \Illuminate\Database\Query\Builder * @static @@ -20616,7 +21872,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Add a where not exists clause to the query. * - * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder $callback + * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*> $callback * @param string $boolean * @return \Illuminate\Database\Query\Builder * @static @@ -20628,7 +21884,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Add a where not exists clause to the query. * - * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder $callback + * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*> $callback * @return \Illuminate\Database\Query\Builder * @static */ public static function orWhereNotExists($callback) @@ -20727,6 +21983,57 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { { /** @var \Illuminate\Database\Query\Builder $instance */ return $instance->orWhereJsonDoesntContain($column, $value); + } + /** + * Add a "where JSON overlaps" clause to the query. + * + * @param string $column + * @param mixed $value + * @param string $boolean + * @param bool $not + * @return \Illuminate\Database\Query\Builder + * @static + */ public static function whereJsonOverlaps($column, $value, $boolean = 'and', $not = false) + { + /** @var \Illuminate\Database\Query\Builder $instance */ + return $instance->whereJsonOverlaps($column, $value, $boolean, $not); + } + /** + * Add an "or where JSON overlaps" clause to the query. + * + * @param string $column + * @param mixed $value + * @return \Illuminate\Database\Query\Builder + * @static + */ public static function orWhereJsonOverlaps($column, $value) + { + /** @var \Illuminate\Database\Query\Builder $instance */ + return $instance->orWhereJsonOverlaps($column, $value); + } + /** + * Add a "where JSON not overlap" clause to the query. + * + * @param string $column + * @param mixed $value + * @param string $boolean + * @return \Illuminate\Database\Query\Builder + * @static + */ public static function whereJsonDoesntOverlap($column, $value, $boolean = 'and') + { + /** @var \Illuminate\Database\Query\Builder $instance */ + return $instance->whereJsonDoesntOverlap($column, $value, $boolean); + } + /** + * Add an "or where JSON not overlap" clause to the query. + * + * @param string $column + * @param mixed $value + * @return \Illuminate\Database\Query\Builder + * @static + */ public static function orWhereJsonDoesntOverlap($column, $value) + { + /** @var \Illuminate\Database\Query\Builder $instance */ + return $instance->orWhereJsonDoesntOverlap($column, $value); } /** * Add a clause that determines if a JSON path exists to the query. @@ -20842,7 +22149,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Add a "where" clause to the query for multiple columns with "and" conditions between them. * - * @param string[] $columns + * @param \Illuminate\Contracts\Database\Query\Expression[]|\Closure[]|string[] $columns * @param mixed $operator * @param mixed $value * @param string $boolean @@ -20856,8 +22163,8 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Add an "or where" clause to the query for multiple columns with "and" conditions between them. * - * @param string[] $columns - * @param string $operator + * @param \Illuminate\Contracts\Database\Query\Expression[]|\Closure[]|string[] $columns + * @param mixed $operator * @param mixed $value * @return \Illuminate\Database\Query\Builder * @static @@ -20867,10 +22174,10 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { return $instance->orWhereAll($columns, $operator, $value); } /** - * Add an "where" clause to the query for multiple columns with "or" conditions between them. + * Add a "where" clause to the query for multiple columns with "or" conditions between them. * - * @param string[] $columns - * @param string $operator + * @param \Illuminate\Contracts\Database\Query\Expression[]|\Closure[]|string[] $columns + * @param mixed $operator * @param mixed $value * @param string $boolean * @return \Illuminate\Database\Query\Builder @@ -20883,8 +22190,8 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Add an "or where" clause to the query for multiple columns with "or" conditions between them. * - * @param string[] $columns - * @param string $operator + * @param \Illuminate\Contracts\Database\Query\Expression[]|\Closure[]|string[] $columns + * @param mixed $operator * @param mixed $value * @return \Illuminate\Database\Query\Builder * @static @@ -20892,6 +22199,33 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { { /** @var \Illuminate\Database\Query\Builder $instance */ return $instance->orWhereAny($columns, $operator, $value); + } + /** + * Add a "where not" clause to the query for multiple columns where none of the conditions should be true. + * + * @param \Illuminate\Contracts\Database\Query\Expression[]|\Closure[]|string[] $columns + * @param mixed $operator + * @param mixed $value + * @param string $boolean + * @return \Illuminate\Database\Query\Builder + * @static + */ public static function whereNone($columns, $operator = null, $value = null, $boolean = 'and') + { + /** @var \Illuminate\Database\Query\Builder $instance */ + return $instance->whereNone($columns, $operator, $value, $boolean); + } + /** + * Add an "or where not" clause to the query for multiple columns where none of the conditions should be true. + * + * @param \Illuminate\Contracts\Database\Query\Expression[]|\Closure[]|string[] $columns + * @param mixed $operator + * @param mixed $value + * @return \Illuminate\Database\Query\Builder + * @static + */ public static function orWhereNone($columns, $operator = null, $value = null) + { + /** @var \Illuminate\Database\Query\Builder $instance */ + return $instance->orWhereNone($columns, $operator, $value); } /** * Add a "group by" clause to the query. @@ -21056,7 +22390,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Add an "order by" clause to the query. * - * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder|\Illuminate\Contracts\Database\Query\Expression|string $column + * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|\Illuminate\Contracts\Database\Query\Expression|string $column * @param string $direction * @return \Illuminate\Database\Query\Builder * @throws \InvalidArgumentException @@ -21069,7 +22403,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Add a descending "order by" clause to the query. * - * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder|\Illuminate\Contracts\Database\Query\Expression|string $column + * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|\Illuminate\Contracts\Database\Query\Expression|string $column * @return \Illuminate\Database\Query\Builder * @static */ public static function orderByDesc($column) @@ -21209,7 +22543,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Add a union statement to the query. * - * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder $query + * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*> $query * @param bool $all * @return \Illuminate\Database\Query\Builder * @static @@ -21221,7 +22555,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { /** * Add a union all statement to the query. * - * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder $query + * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*> $query * @return \Illuminate\Database\Query\Builder * @static */ public static function unionAll($query) @@ -21506,7 +22840,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { * Insert new records into the table using a subquery. * * @param array $columns - * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder|string $query + * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query * @return int * @static */ public static function insertUsing($columns, $query) @@ -21518,7 +22852,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { * Insert new records into the table using a subquery while ignoring errors. * * @param array $columns - * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder|string $query + * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder<*>|string $query * @return int * @static */ public static function insertOrIgnoreUsing($columns, $query) @@ -21541,7 +22875,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { * Insert or update a record matching the attributes, and fill it with values. * * @param array $attributes - * @param array $values + * @param array|callable $values * @return bool * @static */ public static function updateOrInsert($attributes, $values = []) @@ -21793,6 +23127,7 @@ class Eloquent extends \Illuminate\Database\Eloquent\Model { * * @param string $name * @param object|callable $macro + * @param-closure-this static $macro * @return void * @static */ public static function macro($name, $macro) @@ -21862,6 +23197,7 @@ class URL extends \Illuminate\Support\Facades\URL {} class Validator extends \Illuminate\Support\Facades\Validator {} class View extends \Illuminate\Support\Facades\View {} class Vite extends \Illuminate\Support\Facades\Vite {} + class Debugbar extends \Barryvdh\Debugbar\Facades\Debugbar {} class Flare extends \Spatie\LaravelIgnition\Facades\Flare {} } diff --git a/app/Console/Commands/GenerateHighscoreRanks.php b/app/Console/Commands/GenerateHighscoreRanks.php new file mode 100644 index 00000000..e28abe90 --- /dev/null +++ b/app/Console/Commands/GenerateHighscoreRanks.php @@ -0,0 +1,57 @@ +updateTypeRank($type); + } + + } + + private function updateTypeRank(HighscoreTypeEnum $type): void + { + $rank = 1; + $this->info("Updating highscore ranks for $type->name..."); + $query = Highscore::query()->whereHas('player.tech') + ->where($type->name, '!=', null); + $query->orderBy($type->name, 'DESC'); + $bar = $this->output->createProgressBar(); + $bar->start($query->count()); + $query->chunk(200, function ($highscores) use ($type, &$bar, &$rank) { + /** @var \Illuminate\Support\Collection $highscores */ + foreach ($highscores as $highscore) { + $highscore->{$type->name.'_rank'} = $rank; + $highscore->save(); + $bar->advance(); + $rank++; + + } + }); + $this->info("All highscores for type $type->name completed!"); + } +} diff --git a/app/Console/Commands/GenerateHighscores.php b/app/Console/Commands/GenerateHighscores.php new file mode 100644 index 00000000..c7d3bedd --- /dev/null +++ b/app/Console/Commands/GenerateHighscores.php @@ -0,0 +1,53 @@ +whereHas('tech'); + $this->info('Updating highscores...'); + $bar = $this->output->createProgressBar(); + $bar->start($users->count()); + $users->chunk(200, function ($players) use ($playerServiceFactory, $highscoreService, &$bar) { + /** @var \Illuminate\Support\Collection $players */ + foreach ($players as $player) { + $playerService = $playerServiceFactory->make($player->id); + Highscore::updateOrCreate(['player_id' => $player->id], [ + 'general' => $highscoreService->getPlayerScore($playerService), + 'economy' => $highscoreService->getPlayerScoreEconomy($playerService), + 'research' => $highscoreService->getPlayerScoreResearch($playerService), + 'military' => $highscoreService->getPlayerScoreMilitary($playerService), + ]); + $bar->advance(); + + } + }); + $this->info('All highscores completed!'); + + } +} diff --git a/app/Enums/HighscoreTypeEnum.php b/app/Enums/HighscoreTypeEnum.php new file mode 100644 index 00000000..a81df34d --- /dev/null +++ b/app/Enums/HighscoreTypeEnum.php @@ -0,0 +1,14 @@ +getHighscorePlayerRank($player); + $currentPlayerPage = floor($currentPlayerRank / 100) + 1; // Check if we received a page number, if so, use it instead of the current player rank. @@ -86,14 +87,12 @@ public function ajaxPlayer(Request $request, PlayerService $player, HighscoreSer $page = (int)$page; } else { // Initial page based on current player rank (round to the nearest 100 floored). - $page = $currentPlayerPage; + $page = (int)$currentPlayerPage; } - $offset_start = (int)($page - 1) * 100; - // Get highscore players content view statically to insert into page. return view('ingame.highscore.players_points')->with([ - 'highscorePlayers' => $highscoreService->getHighscorePlayers($offset_start), + 'highscorePlayers' => $highscoreService->getHighscorePlayers(pageOn: $page), 'highscorePlayerAmount' => $highscoreService->getHighscorePlayerAmount(), 'highscoreCurrentPlayerRank' => $currentPlayerRank, 'highscoreCurrentPlayerPage' => $currentPlayerPage, @@ -142,11 +141,9 @@ public function ajaxAlliance(Request $request, PlayerService $player, HighscoreS $page = $currentPlayerPage; } - $offset_start = ($page - 1) * 100; - // Get highscore players content view statically to insert into page. return view('ingame.highscore.alliance_points')->with([ - 'highscorePlayers' => $highscoreService->getHighscorePlayers($offset_start), + 'highscorePlayers' => $highscoreService->getHighscorePlayers(pageOn: $page), 'highscorePlayerAmount' => $highscoreService->getHighscorePlayerAmount(), 'highscoreCurrentPlayerRank' => $currentPlayerRank, 'highscoreCurrentPlayerPage' => $currentPlayerPage, diff --git a/app/Http/ViewComposers/IngameMainComposer.php b/app/Http/ViewComposers/IngameMainComposer.php index 4acb5857..e171aa88 100644 --- a/app/Http/ViewComposers/IngameMainComposer.php +++ b/app/Http/ViewComposers/IngameMainComposer.php @@ -5,8 +5,10 @@ use Illuminate\Contracts\View\View; use Illuminate\Http\Request; use Illuminate\Support\Facades\App; +use Illuminate\Support\Facades\Cache; use OGame\Facades\AppUtil; use OGame\Services\FleetMissionService; +use OGame\Services\HighscoreService; use OGame\Services\MessageService; use OGame\Services\PlayerService; use OGame\Services\SettingsService; @@ -26,6 +28,8 @@ class IngameMainComposer private SettingsService $settingsService; private FleetMissionService $fleetMissionService; + private HighscoreService $highscoreService; + /** * IngameMainComposer constructor. * @@ -38,13 +42,14 @@ class IngameMainComposer * @param SettingsService $settingsService * @param FleetMissionService $fleetMissionService */ - public function __construct(Request $request, PlayerService $player, MessageService $messageService, SettingsService $settingsService, FleetMissionService $fleetMissionService) + public function __construct(Request $request, PlayerService $player, MessageService $messageService, SettingsService $settingsService, FleetMissionService $fleetMissionService, HighscoreService $highscoreService) { $this->request = $request; $this->player = $player; $this->messageService = $messageService; $this->settingsService = $settingsService; $this->fleetMissionService = $fleetMissionService; + $this->highscoreService = $highscoreService; } /** @@ -102,6 +107,10 @@ public function compose(View $view): void // Get current locale $locale = App::getLocale(); + $highscoreRank = Cache::remember('player-highscore' . $this->player->getId(), now()->addMinutes(5), function () { + return $this->highscoreService->getHighscorePlayerRank($this->player); + }); + $view->with([ 'underAttack' => $this->fleetMissionService->currentPlayerUnderAttack(), 'unreadMessagesCount' => $this->messageService->getUnreadMessagesCount(), @@ -109,6 +118,7 @@ public function compose(View $view): void 'currentPlayer' => $this->player, 'currentPlanet' => $this->player->planets->current(), 'planets' => $this->player->planets, + 'highscoreRank' => $highscoreRank, 'settings' => $this->settingsService, 'body_id' => $body_id, 'locale' => $locale, diff --git a/app/Models/Highscore.php b/app/Models/Highscore.php new file mode 100644 index 00000000..23ab4be2 --- /dev/null +++ b/app/Models/Highscore.php @@ -0,0 +1,62 @@ +belongsTo(User::class); + } + + /** + * Scope to ensure only valid highscore ranks. + */ + public function scopeValidRanks(Builder $query): void + { + $query->where(function ($query) { + $query->where('general_rank', '!=', null) + ->where('economy_rank', '!=', null) + ->where('military_rank', '!=', null) + ->where('research_rank', '!=', null); + }); + } +} diff --git a/app/Models/UserTech.php b/app/Models/UserTech.php index 63a9cfc9..4c75fcdb 100644 --- a/app/Models/UserTech.php +++ b/app/Models/UserTech.php @@ -2,9 +2,11 @@ namespace OGame\Models; +use Illuminate\Database\Eloquent\Attributes\ObservedBy; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsTo; +use OGame\Observers\UserTechObserver; /** * @@ -56,6 +58,7 @@ * @method static \Database\Factories\UserTechFactory factory($count = null, $state = []) * @mixin \Eloquent */ +#[ObservedBy([UserTechObserver::class])] class UserTech extends Model { use HasFactory; diff --git a/app/Observers/UserTechObserver.php b/app/Observers/UserTechObserver.php new file mode 100644 index 00000000..85b20ce6 --- /dev/null +++ b/app/Observers/UserTechObserver.php @@ -0,0 +1,39 @@ + $userTech->user->id], [ + 'general' => 0, + 'economy' => 0, + 'research' => 0, + 'military' => 0, + 'general_rank' => Highscore::max('general_rank') + 1, + 'economy_rank' => Highscore::max('economy_rank') + 1, + 'research_rank' => Highscore::max('research_rank') + 1, + 'military_rank' => Highscore::max('military_rank') + 1, + ]); + + // Clear highscore caches. + Cache::forget('highscore-player-count'); + + foreach (HighscoreTypeEnum::cases() as $type) { + $pages = floor(Highscore::count() / 100) + 1; + for ($page = 1; $page <= $pages; $page++) { + Cache::forget('highscores'.'-'.$type->name.'-'.$page); + } + } + } +} diff --git a/app/Services/HighscoreService.php b/app/Services/HighscoreService.php index 3938eda6..b4a31cab 100644 --- a/app/Services/HighscoreService.php +++ b/app/Services/HighscoreService.php @@ -2,10 +2,12 @@ namespace OGame\Services; +use Cache; use Exception; +use OGame\Enums\HighscoreTypeEnum; use OGame\Facades\AppUtil; use OGame\Factories\PlayerServiceFactory; -use OGame\Models\User; +use OGame\Models\Highscore; /** * Class Highscore. @@ -18,9 +20,9 @@ class HighscoreService { /** * Highscore type to calculate. - * @var int + * @var HighscoreTypeEnum */ - private int $highscoreType; + private HighscoreTypeEnum $highscoreType; private PlayerServiceFactory $playerServiceFactory; @@ -44,7 +46,7 @@ public function setHighscoreType(int $type): void // 1 = economy points // 2 = research points // 3 = military points - $this->highscoreType = $type; + $this->highscoreType = HighscoreTypeEnum::cases()[$type]; } /** @@ -120,75 +122,47 @@ public function getPlayerScoreEconomy(PlayerService $player): int } /** - * Get highscore players. + * Get highscores. * - * @param int $offset_start - * @param int $return_amount + * @param int $perPage + * @param int $pageOn * @return array> - * @throws Exception */ - public function getHighscorePlayers(int $offset_start = 0, int $return_amount = 100): array + public function getHighscorePlayers(int $perPage = 100, int $pageOn = 1): array { - // Get all players - // TODO: when cached highscore results are available, remove this max 110 players limit. - // This limit is added to prevent loading all players in memory at once which causes timeout issues. - $players = User::take(110)->get(); - $highscore = []; - $count = 0; - foreach ($players as $player) { - $count++; - - // TODO: we get the player score per player now, but we should get it from a cached highscore table - // to improve performance. Currently it works but is slow for large amounts of players. - // Load player object with all planets. - $playerService = $this->playerServiceFactory->make($player->id); - $score = 0; - switch ($this->highscoreType) { - case 1: - $score = $this->getPlayerScoreEconomy($playerService); - break; - case 2: - $score = $this->getPlayerScoreResearch($playerService); - break; - case 3: - $score = $this->getPlayerScoreMilitary($playerService); - break; - default: - $score = $this->getPlayerScore($playerService); - break; - } + // Get all player highscores + $parsedHighscores = []; + + $highscores = Highscore::whereHas('player.tech') + ->with('player') + ->validRanks() + ->orderBy($this->highscoreType->name.'_rank') + ->paginate(perPage: $perPage, page: $pageOn); + foreach ($highscores as $playerScore) { + + // Load player object + // TODO we only use this for the planet details now-- could we perhaps store the planet details in the highscore table too?. + $playerService = $this->playerServiceFactory->make($playerScore->player_id); // Get player main planet coords $mainPlanet = $playerService->planets->first(); + $score = $playerScore->{$this->highscoreType->name} ?? 0; $score_formatted = AppUtil::formatNumber($score); - $highscore[] = [ - 'id' => $player->id, - 'name' => $player->username, + $parsedHighscores[] = [ + 'id' => $playerScore->player_id, + 'name' => $playerScore->player->username, 'points' => $score, 'points_formatted' => $score_formatted, 'planet_coords' => $mainPlanet->getPlanetCoordinates(), - 'rank' => $count, + 'rank' => $playerScore->{$this->highscoreType->name.'_rank'} ]; } - // Order the array by points descending and reset the rank by counting up again. - usort($highscore, function ($a, $b) { - return $b['points'] <=> $a['points']; + return Cache::remember('highscores'.'-'.$this->highscoreType->name.'-'.$pageOn, now()->addMinutes(5), function () use ($parsedHighscores) { + return $parsedHighscores; }); - $count = 0; - foreach ($highscore as $key => &$value) { - $count++; - $value['rank'] = $count; - } - - // Only return the requested 100 players based on starting rank. - if ($return_amount > 0) { - $highscore = array_slice($highscore, $offset_start, 100); - } - - return $highscore; } /** @@ -200,20 +174,9 @@ public function getHighscorePlayers(int $offset_start = 0, int $return_amount = */ public function getHighscorePlayerRank(PlayerService $player): int { - // TODO: this is a slow method, we should cache the highscore list and get the rank from there. - // Get all players - $highscorePlayers = $this->getHighscorePlayers(0, 0); // Find the player in the highscore list to determine its rank. - $rank = 0; - foreach ($highscorePlayers as $highscorePlayer) { - $rank++; - if ($highscorePlayer['id'] === $player->getId()) { - return $rank; - } - } - - return 0; + return Highscore::where('player_id', $player->getId())->first()->general_rank ?? 0; } /** @@ -223,12 +186,8 @@ public function getHighscorePlayerRank(PlayerService $player): int */ public function getHighscorePlayerAmount(): int { - // TODO: return actual player count again when caching is implemented. - $actualUserCount = User::count(); - if ($actualUserCount > 110) { - return 110; - } - - return $actualUserCount; + return Cache::remember('highscore-player-count', now()->addMinutes(5), function () { + return Highscore::query()->validRanks()->count(); + }); } } diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php index 417b02ee..bde3d79d 100644 --- a/database/factories/UserFactory.php +++ b/database/factories/UserFactory.php @@ -4,7 +4,6 @@ use Illuminate\Database\Eloquent\Factories\Factory; use Illuminate\Support\Facades\Hash; -use Illuminate\Support\Str; use OGame\Models\User; /** @@ -25,11 +24,11 @@ class UserFactory extends Factory public function definition(): array { return [ - 'name' => fake()->name(), + 'username' => fake()->name(), 'email' => fake()->unique()->safeEmail(), - 'email_verified_at' => now(), + 'two_factor_confirmed_at' => now(), 'password' => static::$password ??= Hash::make('password'), - 'remember_token' => Str::random(10), + 'lang' => 'en' ]; } @@ -39,7 +38,7 @@ public function definition(): array public function unverified(): static { return $this->state(fn (array $attributes) => [ - 'email_verified_at' => null, + 'two_factor_confirmed_at' => null, ]); } } diff --git a/database/migrations/2024_10_28_232803_create_highscore_table.php b/database/migrations/2024_10_28_232803_create_highscore_table.php new file mode 100644 index 00000000..a8f5c2c4 --- /dev/null +++ b/database/migrations/2024_10_28_232803_create_highscore_table.php @@ -0,0 +1,36 @@ +id(); + $table->integer('player_id', false, true); + $table->foreign('player_id')->references('id')->on('users')->onDelete('cascade'); + $table->bigInteger('general')->default(0); + $table->bigInteger('economy')->default(0); + $table->bigInteger('research')->default(0); + $table->bigInteger('military')->default(0); + $table->bigInteger('general_rank')->nullable()->default(null); + $table->bigInteger('economy_rank')->nullable()->default(null); + $table->bigInteger('research_rank')->nullable()->default(null); + $table->bigInteger('military_rank')->nullable()->default(null); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('highscores'); + } +}; diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 062301bb..40e0f579 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -15,6 +15,7 @@ services: restart: unless-stopped tty: true environment: + CONTAINER_ROLE: app SERVICE_NAME: app SERVICE_TAGS: dev working_dir: /var/www @@ -37,6 +38,21 @@ services: networks: - app-network + #Scheduler + scheduler: + build: + context: . + dockerfile: Dockerfile + image: digitalocean.com/php + depends_on: + - ogame-webserver + volumes: + - .:/var/www/html + environment: + CONTAINER_ROLE: scheduler + networks: + - app-network + #MariaDB Service ogame-db: image: mariadb:11.3.2-jammy diff --git a/docker-compose.yml b/docker-compose.yml index 08dbd6d5..b137c4ec 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,6 +16,7 @@ services: restart: unless-stopped tty: true environment: + CONTAINER_ROLE: app SERVICE_NAME: app SERVICE_TAGS: dev working_dir: /var/www @@ -38,6 +39,21 @@ services: networks: - app-network + #Scheduler + scheduler: + build: + context: . + dockerfile: Dockerfile + image: digitalocean.com/php + depends_on: + - ogame-webserver + volumes: + - .:/var/www/html + environment: + CONTAINER_ROLE: scheduler + networks: + - app-network + #MariaDB Service ogame-db: image: mariadb:11.3.2-jammy diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh new file mode 100644 index 00000000..65e62c21 --- /dev/null +++ b/docker/entrypoint.sh @@ -0,0 +1,14 @@ +role=${CONTAINER_ROLE:-none} + +if [ "$role" = "scheduler" ]; then + while [ true ] + do + php /var/www/html/artisan schedule:run --verbose --no-interaction & + sleep 60 + done +elif [ "$role" = "app" ]; then + exec "php-fpm" +else + echo "Could not match the container role \"$role\"" + exit 1 +fi \ No newline at end of file diff --git a/resources/views/ingame/layouts/main.blade.php b/resources/views/ingame/layouts/main.blade.php index 1e42c996..1b5b5f75 100644 --- a/resources/views/ingame/layouts/main.blade.php +++ b/resources/views/ingame/layouts/main.blade.php @@ -100,7 +100,7 @@ class="overlay textBeefy"
  • @lang('Highscore') - (0) + ({{ $highscoreRank }})
  • comment(Inspiring::quote()); -})->describe('Display an inspiring quote'); +Schedule::command(GenerateHighscores::class)->everyFiveMinutes(); +Schedule::command(GenerateHighscoreRanks::class)->everyFiveMinutes();