1 | <?php |
||
2 | |||
3 | declare(strict_types=1); |
||
4 | |||
5 | namespace Furious\Psr15; |
||
6 | |||
7 | use Psr\Http\Message\ResponseInterface; |
||
8 | use Psr\Http\Message\ServerRequestInterface; |
||
9 | use Psr\Http\Server\MiddlewareInterface; |
||
10 | use Psr\Http\Server\RequestHandlerInterface; |
||
11 | use SplQueue; |
||
12 | |||
13 | final class MiddlewarePipe |
||
14 | implements MiddlewareInterface, |
||
15 | RequestHandlerInterface, |
||
16 | PipeInterface |
||
17 | { |
||
18 | private ?SplQueue $pipeline; |
||
19 | |||
20 | public function __construct() |
||
21 | { |
||
22 | $this->pipeline = new SplQueue(); |
||
23 | } |
||
24 | |||
25 | public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |
||
26 | { |
||
27 | return (new Next($this->pipeline, $handler))->handle($request); |
||
28 | } |
||
29 | |||
30 | public function handle(ServerRequestInterface $request): ResponseInterface |
||
31 | { |
||
32 | return $this->process($request, new EmptyPipelineHandler); |
||
33 | } |
||
34 | |||
35 | public function pipe(MiddlewareInterface $middleware): void |
||
36 | { |
||
37 | $this->pipeline->enqueue($middleware); |
||
0 ignored issues
–
show
|
|||
38 | } |
||
39 | } |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.