Lint
This commit is contained in:
parent
c0daff972b
commit
e10742d298
|
@ -2,18 +2,16 @@
|
||||||
|
|
||||||
namespace App\Invoice\Scopes;
|
namespace App\Invoice\Scopes;
|
||||||
|
|
||||||
use App\Form\Models\Form;
|
|
||||||
use App\Form\Models\Participant;
|
|
||||||
use App\Invoice\Enums\InvoiceStatus;
|
use App\Invoice\Enums\InvoiceStatus;
|
||||||
|
use App\Invoice\Models\Invoice;
|
||||||
use App\Lib\Filter;
|
use App\Lib\Filter;
|
||||||
use Illuminate\Database\Eloquent\Builder;
|
use Illuminate\Database\Eloquent\Builder;
|
||||||
use Illuminate\Support\Arr;
|
|
||||||
use Spatie\LaravelData\Attributes\MapInputName;
|
use Spatie\LaravelData\Attributes\MapInputName;
|
||||||
use Spatie\LaravelData\Attributes\MapOutputName;
|
use Spatie\LaravelData\Attributes\MapOutputName;
|
||||||
use Spatie\LaravelData\Mappers\SnakeCaseMapper;
|
use Spatie\LaravelData\Mappers\SnakeCaseMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @extends Filter<Participant>
|
* @extends Filter<Invoice>
|
||||||
*/
|
*/
|
||||||
#[MapInputName(SnakeCaseMapper::class)]
|
#[MapInputName(SnakeCaseMapper::class)]
|
||||||
#[MapOutputName(SnakeCaseMapper::class)]
|
#[MapOutputName(SnakeCaseMapper::class)]
|
||||||
|
@ -37,6 +35,9 @@ class InvoiceFilterScope extends Filter
|
||||||
return $query;
|
return $query;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritdoc
|
||||||
|
*/
|
||||||
public function toDefault(): self
|
public function toDefault(): self
|
||||||
{
|
{
|
||||||
$this->statuses = $this->statuses === null ? InvoiceStatus::defaultVisibleValues()->toArray() : $this->statuses;
|
$this->statuses = $this->statuses === null ? InvoiceStatus::defaultVisibleValues()->toArray() : $this->statuses;
|
||||||
|
|
|
@ -39,6 +39,9 @@ abstract class Filter extends Data
|
||||||
return static::withoutMagicalCreationFrom($post ?: [])->toDefault();
|
return static::withoutMagicalCreationFrom($post ?: [])->toDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return static(self<T>)
|
||||||
|
*/
|
||||||
public function toDefault(): self
|
public function toDefault(): self
|
||||||
{
|
{
|
||||||
return $this;
|
return $this;
|
||||||
|
|
Loading…
Reference in New Issue