From e10742d298b8b83c22b2f97149f0cf885343140c Mon Sep 17 00:00:00 2001 From: philipp lang Date: Tue, 14 May 2024 09:38:18 +0200 Subject: [PATCH] Lint --- app/Invoice/Scopes/InvoiceFilterScope.php | 9 +++++---- app/Lib/Filter.php | 3 +++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/Invoice/Scopes/InvoiceFilterScope.php b/app/Invoice/Scopes/InvoiceFilterScope.php index 0078cc3b..fc39c08c 100644 --- a/app/Invoice/Scopes/InvoiceFilterScope.php +++ b/app/Invoice/Scopes/InvoiceFilterScope.php @@ -2,18 +2,16 @@ namespace App\Invoice\Scopes; -use App\Form\Models\Form; -use App\Form\Models\Participant; use App\Invoice\Enums\InvoiceStatus; +use App\Invoice\Models\Invoice; use App\Lib\Filter; use Illuminate\Database\Eloquent\Builder; -use Illuminate\Support\Arr; use Spatie\LaravelData\Attributes\MapInputName; use Spatie\LaravelData\Attributes\MapOutputName; use Spatie\LaravelData\Mappers\SnakeCaseMapper; /** - * @extends Filter + * @extends Filter */ #[MapInputName(SnakeCaseMapper::class)] #[MapOutputName(SnakeCaseMapper::class)] @@ -37,6 +35,9 @@ class InvoiceFilterScope extends Filter return $query; } + /** + * @inheritdoc + */ public function toDefault(): self { $this->statuses = $this->statuses === null ? InvoiceStatus::defaultVisibleValues()->toArray() : $this->statuses; diff --git a/app/Lib/Filter.php b/app/Lib/Filter.php index 12f3f749..ae192e64 100644 --- a/app/Lib/Filter.php +++ b/app/Lib/Filter.php @@ -39,6 +39,9 @@ abstract class Filter extends Data return static::withoutMagicalCreationFrom($post ?: [])->toDefault(); } + /** + * @return static(self) + */ public function toDefault(): self { return $this;