1 | <?php |
||
17 | final class Delegate implements Protocol |
||
18 | { |
||
19 | private $protocols; |
||
20 | private $inUse; |
||
21 | |||
22 | public function __construct(Protocol $first, Protocol ...$protocols) |
||
30 | |||
31 | 3 | public function version(): Version |
|
35 | |||
36 | 2 | public function use(Version $version): Protocol |
|
58 | |||
59 | /** |
||
60 | * {@inheritdoc} |
||
61 | */ |
||
62 | 1 | public function read(Method $method, Str $arguments): StreamInterface |
|
66 | |||
67 | 1 | /** |
|
68 | * {@inheritdoc} |
||
69 | 1 | */ |
|
70 | public function readHeader(Str $arguments): StreamInterface |
||
74 | 1 | ||
75 | public function method(string $name): Method |
||
79 | 1 | ||
80 | public function connection(): Connection |
||
84 | |||
85 | public function channel(): Channel |
||
89 | |||
90 | public function exchange(): Exchange |
||
94 | |||
95 | public function queue(): Queue |
||
99 | |||
100 | public function basic(): Basic |
||
104 | |||
105 | public function transaction(): Transaction |
||
109 | } |
||
110 |
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: