diff --git a/src/Livewire/Servers.php b/src/Livewire/Servers.php index d86798ba..acf600cb 100644 --- a/src/Livewire/Servers.php +++ b/src/Livewire/Servers.php @@ -43,7 +43,7 @@ public function render(): Renderable 'memory_current' => (int) $values->memory_used, 'memory_total' => (int) $values->memory_total, 'memory' => $graphs->get($slug)?->get('memory') ?? collect(), - 'storage' => collect($values->storage), // @phpstan-ignore argument.templateType argument.templateType + 'storage' => collect($values->storage), // @phpstan-ignore argument.templateType, argument.templateType 'updated_at' => $updatedAt = CarbonImmutable::createFromTimestamp($system->timestamp), 'recently_reported' => $updatedAt->isAfter(now()->subSeconds(30)), ]; diff --git a/src/PulseServiceProvider.php b/src/PulseServiceProvider.php index c19d33fb..8724c6ab 100644 --- a/src/PulseServiceProvider.php +++ b/src/PulseServiceProvider.php @@ -172,7 +172,7 @@ protected function registerComponents(): void }); $this->callAfterResolving('livewire', function (LivewireManager $livewire, Application $app) { - $middleware = collect($app->make('config')->get('pulse.middleware')) // @phpstan-ignore argument.templateType argument.templateType + $middleware = collect($app->make('config')->get('pulse.middleware')) // @phpstan-ignore argument.templateType, argument.templateType ->map(fn ($middleware) => is_string($middleware) ? Str::before($middleware, ':') : $middleware) diff --git a/src/Recorders/Exceptions.php b/src/Recorders/Exceptions.php index b60bf854..71402dea 100644 --- a/src/Recorders/Exceptions.php +++ b/src/Recorders/Exceptions.php @@ -90,7 +90,7 @@ protected function resolveLocation(Throwable $e): string { return match (true) { $e instanceof \Illuminate\View\ViewException => $this->resolveLocationFromViewException($e), - $e instanceof \Spatie\LaravelIgnition\Exceptions\ViewException => $this->formatLocation($e->getFile(), $e->getLine()), // @phpstan-ignore class.notFound class.notFound class.notFound + $e instanceof \Spatie\LaravelIgnition\Exceptions\ViewException => $this->formatLocation($e->getFile(), $e->getLine()), // @phpstan-ignore class.notFound, class.notFound, class.notFound default => $this->resolveLocationFromTrace($e) }; } diff --git a/src/Recorders/Servers.php b/src/Recorders/Servers.php index f8ce7dd8..c66553b5 100644 --- a/src/Recorders/Servers.php +++ b/src/Recorders/Servers.php @@ -85,7 +85,7 @@ public function record(SharedBeat $event): void 'cpu' => $cpu, 'memory_used' => $memoryUsed, 'memory_total' => $memoryTotal, - 'storage' => collect($this->config->get('pulse.recorders.'.self::class.'.directories')) // @phpstan-ignore argument.templateType argument.templateType + 'storage' => collect($this->config->get('pulse.recorders.'.self::class.'.directories')) // @phpstan-ignore argument.templateType, argument.templateType ->map(fn (string $directory) => [ 'directory' => $directory, 'total' => $total = intval(round(disk_total_space($directory) / 1024 / 1024)), // MB diff --git a/src/Storage/DatabaseStorage.php b/src/Storage/DatabaseStorage.php index fb45c9ee..d398c157 100644 --- a/src/Storage/DatabaseStorage.php +++ b/src/Storage/DatabaseStorage.php @@ -69,22 +69,22 @@ public function store(Collection $items): void }, ['count' => [], 'min' => [], 'max' => [], 'sum' => [], 'avg' => []]) ); - $countChunks = $this->preaggregateCounts(collect($counts)) // @phpstan-ignore argument.templateType argument.templateType + $countChunks = $this->preaggregateCounts(collect($counts)) // @phpstan-ignore argument.templateType, argument.templateType ->chunk($this->config->get('pulse.storage.database.chunk')); - $minimumChunks = $this->preaggregateMinimums(collect($minimums)) // @phpstan-ignore argument.templateType argument.templateType + $minimumChunks = $this->preaggregateMinimums(collect($minimums)) // @phpstan-ignore argument.templateType, argument.templateType ->chunk($this->config->get('pulse.storage.database.chunk')); - $maximumChunks = $this->preaggregateMaximums(collect($maximums)) // @phpstan-ignore argument.templateType argument.templateType + $maximumChunks = $this->preaggregateMaximums(collect($maximums)) // @phpstan-ignore argument.templateType, argument.templateType ->chunk($this->config->get('pulse.storage.database.chunk')); - $sumChunks = $this->preaggregateSums(collect($sums)) // @phpstan-ignore argument.templateType argument.templateType + $sumChunks = $this->preaggregateSums(collect($sums)) // @phpstan-ignore argument.templateType, argument.templateType ->chunk($this->config->get('pulse.storage.database.chunk')); - $averageChunks = $this->preaggregateAverages(collect($averages)) // @phpstan-ignore argument.templateType argument.templateType + $averageChunks = $this->preaggregateAverages(collect($averages)) // @phpstan-ignore argument.templateType, argument.templateType ->chunk($this->config->get('pulse.storage.database.chunk')); - $valueChunks = $this + $valueChunks = $this // @phpstan-ignore argument.templateType ->collapseValues($values) ->when( $this->requiresManualKeyHash(), @@ -464,7 +464,7 @@ public function graph(array $types, string $aggregate, CarbonInterval $interval) $structure = collect($types)->mapWithKeys(fn ($type) => [$type => $padding]); - return $this->connection()->table('pulse_aggregates') // @phpstan-ignore return.type + return $this->connection()->table('pulse_aggregates') ->select(['bucket', 'type', 'key', 'value']) ->whereIn('type', $types) ->where('aggregate', $aggregate) @@ -725,7 +725,7 @@ public function aggregateTotal( $tailStart = $windowStart; $tailEnd = $oldestBucket - 1; - return $this->connection()->query() + return $this->connection()->query() // @phpstan-ignore return.type ->when(is_array($types), fn ($query) => $query->addSelect('type')) ->selectRaw(match ($aggregate) { 'count' => "sum({$this->wrap('count')})", diff --git a/src/Support/RedisAdapter.php b/src/Support/RedisAdapter.php index dc8883ea..0ea1cd08 100644 --- a/src/Support/RedisAdapter.php +++ b/src/Support/RedisAdapter.php @@ -50,14 +50,14 @@ public function xadd(string $key, array $dictionary): string|Pipeline|PhpRedis|R */ public function xrange(string $key, string $start, string $end, ?int $count = null): array { - return collect($this->handle([ // @phpstan-ignore return.type argument.templateType argument.templateType + return collect($this->handle([ // @phpstan-ignore return.type, argument.templateType, argument.templateType 'XRANGE', $this->config->get('database.redis.options.prefix').$key, $start, $end, ...$count !== null ? ['COUNT', "$count"] : [], ]))->mapWithKeys(fn ($value, $key) => [ - $value[0] => collect($value[1]) // @phpstan-ignore argument.templateType argument.templateType + $value[0] => collect($value[1]) // @phpstan-ignore argument.templateType, argument.templateType ->chunk(2) ->map->values() ->mapWithKeys(fn ($value, $key) => [$value[0] => $value[1]])