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;