20 lines
530 B
PHP
20 lines
530 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
declare(strict_types=1);
|
||
|
|
|
||
|
|
namespace App\Contracts;
|
||
|
|
|
||
|
|
interface Executor
|
||
|
|
{
|
||
|
|
/**
|
||
|
|
* @template TInputAction of \App\Contracts\ActionInput
|
||
|
|
* @template TInputQuery of \App\Contracts\QueryInput
|
||
|
|
* @template TResult
|
||
|
|
*
|
||
|
|
* @param \App\Contracts\Query<TInputQuery,TResult>|\App\Contracts\Action<TInputAction,TResult> $executable
|
||
|
|
* @param TInputAction|TInputQuery $input
|
||
|
|
* @return TResult
|
||
|
|
*/
|
||
|
|
public function execute(Action | Query $executable, ActionInput | QueryInput $input): mixed;
|
||
|
|
}
|