2023-01-22 19:47:21 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Features;
|
|
|
|
|
|
|
|
use App\Dto\QueryUpcomingAnimeSeasonCommand;
|
2023-01-23 20:07:41 +00:00
|
|
|
use App\Enums\AnimeTypeEnum;
|
|
|
|
use Illuminate\Contracts\Database\Query\Builder;
|
2023-01-22 19:47:21 +00:00
|
|
|
|
|
|
|
/**
|
2023-01-23 20:07:41 +00:00
|
|
|
* @extends QueryAnimeSeasonHandlerBase<QueryUpcomingAnimeSeasonCommand>
|
2023-01-22 19:47:21 +00:00
|
|
|
*/
|
2023-01-23 20:07:41 +00:00
|
|
|
final class QueryUpcomingAnimeSeasonHandler extends QueryAnimeSeasonHandlerBase
|
2023-01-22 19:47:21 +00:00
|
|
|
{
|
2023-01-23 20:07:41 +00:00
|
|
|
public function requestClass(): string
|
2023-01-22 19:47:21 +00:00
|
|
|
{
|
2023-01-23 20:07:41 +00:00
|
|
|
return QueryUpcomingAnimeSeasonCommand::class;
|
2023-01-22 19:47:21 +00:00
|
|
|
}
|
|
|
|
|
2023-01-23 20:07:41 +00:00
|
|
|
protected function getSeasonItems($request, ?AnimeTypeEnum $type): Builder
|
2023-01-22 19:47:21 +00:00
|
|
|
{
|
2023-06-30 13:25:09 +01:00
|
|
|
return $this->repository->getUpcomingSeasonItems($type);
|
2023-01-22 19:47:21 +00:00
|
|
|
}
|
|
|
|
}
|