1: | <?php declare(strict_types=1); |
2: | |
3: | namespace Salient\Contract\Core\Pipeline; |
4: | |
5: | use Closure; |
6: | |
7: | /** |
8: | * @template TInput |
9: | * @template TOutput |
10: | * @template TArgument |
11: | */ |
12: | interface PipeInterface |
13: | { |
14: | /** |
15: | * @param TInput|TOutput $payload |
16: | * @param PipelineInterface<TInput,TOutput,TArgument> $pipeline |
17: | * @param TArgument $arg |
18: | * @return ($payload is TInput ? TInput|TOutput : TOutput) |
19: | */ |
20: | public function __invoke($payload, Closure $next, PipelineInterface $pipeline, $arg); |
21: | } |
22: |