Skip to content

Commit 23261d2

Browse files
committed
Bridge::through() only accepts PipeInterface.
1 parent a69dc0c commit 23261d2

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

Server/Bridge.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,8 @@ public function for( Request $request, Response $response ): self {
4040
return $this;
4141
}
4242

43-
/**
44-
* @param string|PipeInterface|(Closure(Response, Closure $next, Request, ?string $requestHandlerClassName): Response) $pipe
45-
* @param string|PipeInterface|(Closure(Response, Closure $next, Request, ?string $requestHandlerClassName): Response) ...$pipes
46-
*/
47-
public function through( string|Closure|PipeInterface $pipe, string|Closure|PipeInterface ...$pipes ): self {
48-
foreach ( array( $pipe, ...$pipes ) as $handler ) {
49-
$this->pipes[] = Pipe::create( $handler, $this->container );
50-
}
43+
public function through( PipeInterface $pipe, PipeInterface ...$pipes ): self {
44+
$this->pipes = array( $pipe, ...$pipes );
5145

5246
return $this;
5347
}

0 commit comments

Comments
 (0)