| 1 | <?php |
||
| 14 | class DebugbarMiddleware implements ServerMiddlewareInterface |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * The DebugBar instance |
||
| 18 | * |
||
| 19 | * @var DebugBar |
||
| 20 | */ |
||
| 21 | protected $debugbar; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Create a new session middleware. |
||
| 25 | * |
||
| 26 | * @param DebugBar $debugbar |
||
| 27 | */ |
||
| 28 | public function __construct(DebugBar $debugbar) |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @inheritdoc |
||
| 35 | */ |
||
| 36 | public function process(ServerRequestInterface $request, DelegateInterface $delegate) |
||
| 44 | } |
This check looks for parameters that are defined as one type in their type hint or doc comment but seem to be used as a narrower type, i.e an implementation of an interface or a subclass.
Consider changing the type of the parameter or doing an instanceof check before assuming your parameter is of the expected type.