Skip to content

Commit 6add383

Browse files
authored
Merge pull request #379 from timacdonald/sa
[1.x] Fix static analysis
2 parents ce3b631 + e779d37 commit 6add383

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

src/Livewire/Servers.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function render(): Renderable
4343
'memory_current' => (int) $values->memory_used,
4444
'memory_total' => (int) $values->memory_total,
4545
'memory' => $graphs->get($slug)?->get('memory') ?? collect(),
46-
'storage' => collect($values->storage), // @phpstan-ignore argument.templateType argument.templateType
46+
'storage' => collect($values->storage), // @phpstan-ignore argument.templateType, argument.templateType
4747
'updated_at' => $updatedAt = CarbonImmutable::createFromTimestamp($system->timestamp),
4848
'recently_reported' => $updatedAt->isAfter(now()->subSeconds(30)),
4949
];

src/PulseServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ protected function registerComponents(): void
172172
});
173173

174174
$this->callAfterResolving('livewire', function (LivewireManager $livewire, Application $app) {
175-
$middleware = collect($app->make('config')->get('pulse.middleware')) // @phpstan-ignore argument.templateType argument.templateType
175+
$middleware = collect($app->make('config')->get('pulse.middleware')) // @phpstan-ignore argument.templateType, argument.templateType
176176
->map(fn ($middleware) => is_string($middleware)
177177
? Str::before($middleware, ':')
178178
: $middleware)

src/Recorders/Exceptions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ protected function resolveLocation(Throwable $e): string
9090
{
9191
return match (true) {
9292
$e instanceof \Illuminate\View\ViewException => $this->resolveLocationFromViewException($e),
93-
$e instanceof \Spatie\LaravelIgnition\Exceptions\ViewException => $this->formatLocation($e->getFile(), $e->getLine()), // @phpstan-ignore class.notFound class.notFound class.notFound
93+
$e instanceof \Spatie\LaravelIgnition\Exceptions\ViewException => $this->formatLocation($e->getFile(), $e->getLine()), // @phpstan-ignore class.notFound, class.notFound, class.notFound
9494
default => $this->resolveLocationFromTrace($e)
9595
};
9696
}

src/Recorders/Servers.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function record(SharedBeat $event): void
8585
'cpu' => $cpu,
8686
'memory_used' => $memoryUsed,
8787
'memory_total' => $memoryTotal,
88-
'storage' => collect($this->config->get('pulse.recorders.'.self::class.'.directories')) // @phpstan-ignore argument.templateType argument.templateType
88+
'storage' => collect($this->config->get('pulse.recorders.'.self::class.'.directories')) // @phpstan-ignore argument.templateType, argument.templateType
8989
->map(fn (string $directory) => [
9090
'directory' => $directory,
9191
'total' => $total = intval(round(disk_total_space($directory) / 1024 / 1024)), // MB

src/Storage/DatabaseStorage.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,22 +69,22 @@ public function store(Collection $items): void
6969
}, ['count' => [], 'min' => [], 'max' => [], 'sum' => [], 'avg' => []])
7070
);
7171

72-
$countChunks = $this->preaggregateCounts(collect($counts)) // @phpstan-ignore argument.templateType argument.templateType
72+
$countChunks = $this->preaggregateCounts(collect($counts)) // @phpstan-ignore argument.templateType, argument.templateType
7373
->chunk($this->config->get('pulse.storage.database.chunk'));
7474

75-
$minimumChunks = $this->preaggregateMinimums(collect($minimums)) // @phpstan-ignore argument.templateType argument.templateType
75+
$minimumChunks = $this->preaggregateMinimums(collect($minimums)) // @phpstan-ignore argument.templateType, argument.templateType
7676
->chunk($this->config->get('pulse.storage.database.chunk'));
7777

78-
$maximumChunks = $this->preaggregateMaximums(collect($maximums)) // @phpstan-ignore argument.templateType argument.templateType
78+
$maximumChunks = $this->preaggregateMaximums(collect($maximums)) // @phpstan-ignore argument.templateType, argument.templateType
7979
->chunk($this->config->get('pulse.storage.database.chunk'));
8080

81-
$sumChunks = $this->preaggregateSums(collect($sums)) // @phpstan-ignore argument.templateType argument.templateType
81+
$sumChunks = $this->preaggregateSums(collect($sums)) // @phpstan-ignore argument.templateType, argument.templateType
8282
->chunk($this->config->get('pulse.storage.database.chunk'));
8383

84-
$averageChunks = $this->preaggregateAverages(collect($averages)) // @phpstan-ignore argument.templateType argument.templateType
84+
$averageChunks = $this->preaggregateAverages(collect($averages)) // @phpstan-ignore argument.templateType, argument.templateType
8585
->chunk($this->config->get('pulse.storage.database.chunk'));
8686

87-
$valueChunks = $this
87+
$valueChunks = $this // @phpstan-ignore argument.templateType
8888
->collapseValues($values)
8989
->when(
9090
$this->requiresManualKeyHash(),
@@ -464,7 +464,7 @@ public function graph(array $types, string $aggregate, CarbonInterval $interval)
464464

465465
$structure = collect($types)->mapWithKeys(fn ($type) => [$type => $padding]);
466466

467-
return $this->connection()->table('pulse_aggregates') // @phpstan-ignore return.type
467+
return $this->connection()->table('pulse_aggregates')
468468
->select(['bucket', 'type', 'key', 'value'])
469469
->whereIn('type', $types)
470470
->where('aggregate', $aggregate)
@@ -725,7 +725,7 @@ public function aggregateTotal(
725725
$tailStart = $windowStart;
726726
$tailEnd = $oldestBucket - 1;
727727

728-
return $this->connection()->query()
728+
return $this->connection()->query() // @phpstan-ignore return.type
729729
->when(is_array($types), fn ($query) => $query->addSelect('type'))
730730
->selectRaw(match ($aggregate) {
731731
'count' => "sum({$this->wrap('count')})",

src/Support/RedisAdapter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@ public function xadd(string $key, array $dictionary): string|Pipeline|PhpRedis|R
5050
*/
5151
public function xrange(string $key, string $start, string $end, ?int $count = null): array
5252
{
53-
return collect($this->handle([ // @phpstan-ignore return.type argument.templateType argument.templateType
53+
return collect($this->handle([ // @phpstan-ignore return.type, argument.templateType, argument.templateType
5454
'XRANGE',
5555
$this->config->get('database.redis.options.prefix').$key,
5656
$start,
5757
$end,
5858
...$count !== null ? ['COUNT', "$count"] : [],
5959
]))->mapWithKeys(fn ($value, $key) => [
60-
$value[0] => collect($value[1]) // @phpstan-ignore argument.templateType argument.templateType
60+
$value[0] => collect($value[1]) // @phpstan-ignore argument.templateType, argument.templateType
6161
->chunk(2)
6262
->map->values()
6363
->mapWithKeys(fn ($value, $key) => [$value[0] => $value[1]])

0 commit comments

Comments
 (0)