| 1 | <?php |
||
| 12 | class ActionDispatcherMiddleware implements ServerMiddlewareInterface |
||
| 13 | { |
||
| 14 | |||
| 15 | /** |
||
| 16 | * The session manager. |
||
| 17 | * |
||
| 18 | * @var Dispatcher |
||
| 19 | */ |
||
| 20 | protected $dispatcher; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Create a new session middleware. |
||
| 24 | * |
||
| 25 | * @param Dispatcher $dispatcher |
||
| 26 | */ |
||
| 27 | public function __construct(Dispatcher $dispatcher) |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @inheritdoc |
||
| 34 | */ |
||
| 35 | public function process(ServerRequestInterface $request, DelegateInterface $delegate) |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @return Dispatcher |
||
| 42 | */ |
||
| 43 | protected function getDispatcher(): Dispatcher |
||
| 47 | } |
||
| 48 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: