mirror of
https://github.com/jikan-me/jikan-rest.git
synced 2025-02-20 11:23:35 +08:00
- AppServiceProvider is needs more work to wire in new services - todo: more dtos - todo: add unit tests - todo: add more integration tests
26 lines
530 B
PHP
26 lines
530 B
PHP
<?php
|
|
|
|
namespace App\Contracts;
|
|
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
use Illuminate\Http\Resources\Json\ResourceCollection;
|
|
use Illuminate\Http\Response;
|
|
|
|
/**
|
|
* @template TRequest of DataRequest<TResponse>
|
|
* @template TResponse of ResourceCollection|JsonResource|Response
|
|
*/
|
|
interface RequestHandler
|
|
{
|
|
/**
|
|
* @param TRequest $request
|
|
* @return TResponse
|
|
*/
|
|
public function handle($request);
|
|
|
|
/**
|
|
* @return class-string<TRequest>
|
|
*/
|
|
public function requestClass(): string;
|
|
}
|