Lint
continuous-integration/drone/push Build was killed Details

This commit is contained in:
philipp lang 2024-12-12 00:36:56 +01:00
parent 6a91e857d2
commit 1178b011e0
4 changed files with 11 additions and 4 deletions

View File

@ -6,7 +6,6 @@ use App\Form\Models\Form;
use App\Form\Models\Participant;
use App\Form\Resources\ParticipantResource;
use App\Form\Scopes\ParticipantFilterScope;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Http\Resources\Json\AnonymousResourceCollection;
use Laravel\Scout\Builder;
use Lorisleiva\Actions\Concerns\AsAction;
@ -16,7 +15,7 @@ class ParticipantIndexAction
use AsAction;
/**
* @return HasMany<Participant>
* @return Builder<Participant>
*/
protected function getQuery(Form $form, ParticipantFilterScope $filter): Builder
{

View File

@ -180,4 +180,10 @@ abstract class Field extends Data
{
return app(SingleValueMatcher::class);
}
/** @param mixed $value */
public function filter($value): string
{
return '';
}
}

View File

@ -104,11 +104,12 @@ class Participant extends Model implements Preventable
return 'Nachweise erforderlich für deine Anmeldung zu ' . $this->form->name;
}
public function searchableAs()
public function searchableAs(): string
{
return $this->form->participantsSearchableAs();
}
/** @return array<string, mixed> */
public function toSearchableArray(): array
{
return [...$this->data, 'parent-id' => $this->parent_id];

View File

@ -13,7 +13,7 @@ use Spatie\LaravelData\Attributes\MapOutputName;
use Spatie\LaravelData\Mappers\SnakeCaseMapper;
/**
* @extends Filter<Participant>
* @extends ScoutFilter<Participant>
*/
#[MapInputName(SnakeCaseMapper::class)]
#[MapOutputName(SnakeCaseMapper::class)]
@ -25,6 +25,7 @@ class ParticipantFilterScope extends ScoutFilter
/**
* @param array<string, mixed> $data
* @param array<string, mixed> $options
*/
public function __construct(
public array $data = [],