1 | <?php |
||
28 | class SubscriptionManager extends Component |
||
29 | { |
||
30 | use BetterEmitter; |
||
31 | |||
32 | protected function init() |
||
38 | |||
39 | 1 | private function handleSubscriptionRequest(Presence $presence) |
|
43 | |||
44 | /** |
||
45 | * Sends subscription request presence to server. |
||
46 | * |
||
47 | * @param Jid|string $jid |
||
48 | * @return \React\Promise\ExtendedPromiseInterface |
||
49 | */ |
||
50 | 1 | public function subscribe($jid) |
|
54 | |||
55 | /** |
||
56 | * Sends subscription removal request presence to server. |
||
57 | * |
||
58 | * @param Jid|string $jid |
||
59 | * @return \React\Promise\ExtendedPromiseInterface |
||
60 | */ |
||
61 | 1 | public function unsubscribe(Jid $jid) |
|
65 | |||
66 | /** |
||
67 | * Sends subscription cancellation request presence to server. |
||
68 | * |
||
69 | * @param Jid|string $jid |
||
70 | * @return \React\Promise\ExtendedPromiseInterface |
||
71 | */ |
||
72 | 1 | public function cancel($jid) |
|
76 | |||
77 | 3 | private function presence($type, $jid) |
|
85 | } |
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: