Skip to content

Commit

Permalink
fix phpstan errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Nielsvanpach committed Jan 20, 2025
1 parent 86c2b25 commit 7f39bef
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions app/Actions/DetermineBlackFridayRewardAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use App\Models\User;
use Illuminate\Database\Query\Builder;
use Illuminate\Support\Arr;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\DB;

class DetermineBlackFridayRewardAction
Expand All @@ -22,6 +23,7 @@ public function execute(
return $redeemedReward;
}

/** @var Collection{id: int, type: string} $specialRewards */
$specialRewards = DB::table('bf24_rewards')
->where('available_at', '<=', now())
->where('day', $day)
Expand Down
2 changes: 1 addition & 1 deletion app/Livewire/RepositoriesComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function total(): int
#[Computed]
public function hasMore(): bool
{
return $this->repositories->count() < $this->total;
return $this->repositories->count() < $this->total();
}

public function render(): View
Expand Down
2 changes: 1 addition & 1 deletion app/Livewire/TopSecretComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public function submitAnswer(): void
->where('day', $this->currentDay)
->firstOrFail();

if (strcasecmp($this->answer, $questionRow?->answer) !== 0) {
if (strcasecmp($this->answer, $questionRow->answer) !== 0) {
$this->answer = '';
$this->hint = $questionRow->hint;
$this->showHint = true;
Expand Down
5 changes: 5 additions & 0 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ parameters:
count: 1
path: app/Http/Controllers/InvoicesController.php

-
message: "#^Method App\\\\Http\\\\Controllers\\\\WebhookController\\:\\:findOrCreateCustomer\\(\\) has invalid return type Laravel\\\\Paddle\\\\Billable\\.$#"
count: 1
path: app/Http/Controllers/WebhookController.php

-
message: "#^Access to an undefined property App\\\\Models\\\\Lesson\\:\\:\\$description\\.$#"
count: 1
Expand Down

0 comments on commit 7f39bef

Please sign in to comment.