From bea3e493fc3f2552d03bcc376b0409d059cbded6 Mon Sep 17 00:00:00 2001 From: philipp lang Date: Thu, 17 Nov 2022 02:18:57 +0100 Subject: [PATCH] fixed tests --- app/Efz/EfzPendingBlock.php | 2 +- app/Home/Blocks/Block.php | 3 +++ app/Payment/MemberPaymentBlock.php | 2 +- phpstan.neon | 10 ---------- 4 files changed, 5 insertions(+), 12 deletions(-) diff --git a/app/Efz/EfzPendingBlock.php b/app/Efz/EfzPendingBlock.php index ffdab3d6..96e28047 100644 --- a/app/Efz/EfzPendingBlock.php +++ b/app/Efz/EfzPendingBlock.php @@ -22,7 +22,7 @@ class EfzPendingBlock extends Block } /** - * @return array{member: array} + * @return array{members: array} */ public function data(): array { diff --git a/app/Home/Blocks/Block.php b/app/Home/Blocks/Block.php index e5c0d42e..ad3bdfa0 100644 --- a/app/Home/Blocks/Block.php +++ b/app/Home/Blocks/Block.php @@ -4,6 +4,9 @@ namespace App\Home\Blocks; abstract class Block { + /** + * @return array + */ abstract protected function data(): array; abstract protected function title(): string; diff --git a/app/Payment/MemberPaymentBlock.php b/app/Payment/MemberPaymentBlock.php index be5e1721..66d309eb 100644 --- a/app/Payment/MemberPaymentBlock.php +++ b/app/Payment/MemberPaymentBlock.php @@ -18,7 +18,7 @@ class MemberPaymentBlock extends Block return [ 'members' => $members, 'total_members' => Member::count(), - 'amount' => number_format($amount->nr / 100, 2, ',', '.').' €', + 'amount' => number_format((int) $amount->nr / 100, 2, ',', '.').' €', ]; } diff --git a/phpstan.neon b/phpstan.neon index fc960dbd..d1f5e4b7 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -185,16 +185,6 @@ parameters: count: 1 path: app/Http/Resources/UserResource.php - - - message: "#^Method App\\\\Http\\\\Views\\\\HomeView\\:\\:index\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: app/Http/Views/HomeView.php - - - - message: "#^Method App\\\\Http\\\\Views\\\\MemberTriesResource\\:\\:toArray\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: app/Http/Views/MemberTriesResource.php - - message: "#^Method App\\\\Http\\\\Views\\\\MemberView\\:\\:index\\(\\) has parameter \\$filter with no value type specified in iterable type array\\.$#" count: 1