1 | <?php |
||
13 | class PipeMiddleware implements MiddlewareInterface, RequestHandlerInterface |
||
14 | { |
||
15 | protected $stack = []; |
||
16 | |||
17 | 5 | public function __construct(array $middlewares = []) |
|
24 | |||
25 | 4 | public function register(MiddlewareInterface $middleware): self |
|
30 | |||
31 | 4 | public function handle(ServerRequestInterface $req): ResponseInterface |
|
42 | |||
43 | 2 | public function process(ServerRequestInterface $req, RequestHandlerInterface $handler): ResponseInterface |
|
49 | } |
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent.
Consider making the comparison explicit by using
empty(..)
or! empty(...)
instead.