From 00323cc6ac04bcfe2daba63150749645e90c582f Mon Sep 17 00:00:00 2001 From: philipp lang Date: Sat, 12 Feb 2022 01:25:22 +0100 Subject: [PATCH] Lint --- app/Pdf/MemberPdfController.php | 4 ++-- tests/Lib/TestsInertia.php | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/app/Pdf/MemberPdfController.php b/app/Pdf/MemberPdfController.php index aa37dba3..f22e5096 100644 --- a/app/Pdf/MemberPdfController.php +++ b/app/Pdf/MemberPdfController.php @@ -4,13 +4,13 @@ namespace App\Pdf; use App\Http\Controllers\Controller; use App\Member\Member; -use Illuminate\Contracts\Support\Responsable; use Illuminate\Http\Request; +use Illuminate\Http\Response; class MemberPdfController extends Controller { - public function __invoke(Request $request, Member $member): Responsable + public function __invoke(Request $request, Member $member) { $repo = app(PdfRepositoryFactory::class)->fromSingleRequest($request->type, $member); diff --git a/tests/Lib/TestsInertia.php b/tests/Lib/TestsInertia.php index b05fc64f..c0be848d 100644 --- a/tests/Lib/TestsInertia.php +++ b/tests/Lib/TestsInertia.php @@ -7,7 +7,7 @@ use PHPUnit\Framework\Assert as PHPUnit; trait TestsInertia { - public function assertInertiaHas(mixed $value, TestResponse $response, ?string $key = null): void + public function assertInertiaHas($value, TestResponse $response, ?string $key = null): void { $bindings = json_decode(json_encode($value), true); $viewData = json_decode(json_encode( @@ -23,7 +23,7 @@ trait TestsInertia { PHPUnit::assertEquals($component, $response->viewData('page')['component']); } - public function assertInertiaDeepNest(mixed $should, mixed $is): void + public function assertInertiaDeepNest($should, $is): void { foreach ($should as $key => $value) { PHPUnit::assertArrayHasKey($key, $is); @@ -37,7 +37,10 @@ trait TestsInertia { } } - public function inertia(TestResponse $response, string $key): mixed + /** + * @return mixed + */ + public function inertia(TestResponse $response, string $key) { return data_get($response->viewData('page')['props'], $key); }