From 664b88564db6dc2ba93fac3014d2c57aa903ddda Mon Sep 17 00:00:00 2001 From: philipp lang Date: Sun, 22 Sep 2024 18:25:31 +0200 Subject: [PATCH] Fix phpstan --- app/Membership/TestersBlock.php | 4 ++-- phpstan.neon | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/Membership/TestersBlock.php b/app/Membership/TestersBlock.php index 83267fdf..49cf7f25 100644 --- a/app/Membership/TestersBlock.php +++ b/app/Membership/TestersBlock.php @@ -13,8 +13,8 @@ class TestersBlock extends Block */ public function query(): Builder { - return Member::with('memberships', fn ($q) => $q->isTrying()) - ->whereHas('memberships', fn ($q) => $q->isTrying()); + return Member::whereHas('memberships', fn ($q) => $q->isTrying()) + ->with('memberships', fn ($q) => $q->isTrying()); } /** diff --git a/phpstan.neon b/phpstan.neon index c8185965..fed30009 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -502,3 +502,8 @@ parameters: message: "#^Call to an undefined method Phake\\\\Proxies\\\\VerifierProxy\\:\\:handle\\(\\)\\.$#" count: 2 path: tests/Feature/Member/NamiPutMemberActionTest.php + + - + message: "#^Call to an undefined method Illuminate\\\\Database\\\\Eloquent\\\\Relations\\\\Relation\\<\\*, \\*, \\*\\>\\:\\:isTrying\\(\\)\\.$#" + count: 1 + path: app/Membership/TestersBlock.php