From 92997aa78f8bbebd377dbde87b621090c673348c Mon Sep 17 00:00:00 2001 From: philipp lang Date: Tue, 2 Jul 2024 23:00:09 +0200 Subject: [PATCH] Lint --- app/Form/Models/Participant.php | 3 +++ app/Member/Member.php | 2 +- app/Prevention/Mails/PreventionRememberMail.php | 5 +++-- tests/Feature/Member/PreventionTest.php | 3 ++- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/app/Form/Models/Participant.php b/app/Form/Models/Participant.php index 96c055c6..a1974425 100644 --- a/app/Form/Models/Participant.php +++ b/app/Form/Models/Participant.php @@ -52,6 +52,9 @@ class Participant extends Model implements Preventable return $filter->apply($query); } + /** + * @return BelongsTo + */ public function member(): BelongsTo { return $this->belongsTo(Member::class); diff --git a/app/Member/Member.php b/app/Member/Member.php index fe5de866..69759e5b 100644 --- a/app/Member/Member.php +++ b/app/Member/Member.php @@ -351,7 +351,7 @@ class Member extends Model implements Geolocatable return []; } - /** @var array */ $preventions = []; if ($this->efz === null || $this->efz->diffInYears($date) >= 5) { diff --git a/app/Prevention/Mails/PreventionRememberMail.php b/app/Prevention/Mails/PreventionRememberMail.php index f423c575..e2833701 100644 --- a/app/Prevention/Mails/PreventionRememberMail.php +++ b/app/Prevention/Mails/PreventionRememberMail.php @@ -5,6 +5,7 @@ namespace App\Prevention\Mails; use App\Invoice\InvoiceSettings; use App\Prevention\Contracts\Preventable; use Illuminate\Bus\Queueable; +use Illuminate\Mail\Attachment; use Illuminate\Mail\Mailable; use Illuminate\Mail\Mailables\Content; use Illuminate\Mail\Mailables\Envelope; @@ -53,9 +54,9 @@ class PreventionRememberMail extends Mailable /** * Get the attachments for the message. * - * @return array + * @return array */ - public function attachments() + public function attachments(): array { return []; } diff --git a/tests/Feature/Member/PreventionTest.php b/tests/Feature/Member/PreventionTest.php index 9a662ace..d0b3519e 100644 --- a/tests/Feature/Member/PreventionTest.php +++ b/tests/Feature/Member/PreventionTest.php @@ -91,7 +91,7 @@ class PreventionTest extends TestCase $this->assertNull($participant->fresh()->last_remembered_at); } - private function attributes(): Generator + protected function attributes(): Generator { yield [ 'attrs' => ['efz' => null, 'ps_at' => now()], @@ -136,6 +136,7 @@ class PreventionTest extends TestCase /** * @param array $preventions + * @param array $memberAttributes * @dataProvider attributes */ public function testItRemembersMember(array $memberAttributes, array $preventions): void