1 | <?php |
||
19 | class ClientSession implements ClientSessionInterface |
||
20 | { |
||
21 | /** |
||
22 | * @var ThruwaySession |
||
23 | */ |
||
24 | protected $thruwaySession; |
||
25 | |||
26 | public function __construct(ThruwaySession $thruwaySession) |
||
30 | |||
31 | /** |
||
32 | * Subscribe. |
||
33 | * |
||
34 | * @param string $topicName |
||
35 | * @param callable $callback |
||
36 | * @param $options array |
||
37 | * |
||
38 | * @return PromiseAdapter |
||
39 | */ |
||
40 | public function subscribe($topicName, callable $callback, $options = null) |
||
46 | |||
47 | /** |
||
48 | * Publish. |
||
49 | * |
||
50 | * @param string $topicName |
||
51 | * @param array|mixed $arguments |
||
52 | * @param array|mixed $argumentsKw |
||
53 | * @param array|mixed $options |
||
54 | * |
||
55 | * @return PromiseAdapter |
||
56 | */ |
||
57 | public function publish($topicName, $arguments = null, $argumentsKw = null, $options = null) |
||
63 | |||
64 | /** |
||
65 | * Register. |
||
66 | * |
||
67 | * @param string $procedureName |
||
68 | * @param callable $callback |
||
69 | * @param array|mixed $options |
||
70 | * |
||
71 | * @return PromiseAdapter |
||
72 | */ |
||
73 | public function register($procedureName, callable $callback, $options = null) |
||
79 | |||
80 | /** |
||
81 | * Unregister. |
||
82 | * |
||
83 | * @param string $procedureName |
||
84 | * |
||
85 | * @return PromiseAdapter |
||
86 | */ |
||
87 | public function unregister($procedureName) |
||
93 | |||
94 | /** |
||
95 | * Call. |
||
96 | * |
||
97 | * @param string $procedureName |
||
98 | * @param array|mixed $arguments |
||
99 | * @param array|mixed $argumentsKw |
||
100 | * @param array|mixed $options |
||
101 | * |
||
102 | * @return PromiseAdapter |
||
103 | */ |
||
104 | public function call($procedureName, $arguments = null, $argumentsKw = null, $options = null) |
||
110 | |||
111 | /** |
||
112 | * @param int $sessionId |
||
113 | */ |
||
114 | public function setSessionId($sessionId) |
||
118 | |||
119 | /** |
||
120 | * @return int the Session Id |
||
121 | */ |
||
122 | public function getSessionId() |
||
126 | |||
127 | /** |
||
128 | * @param $msg |
||
129 | */ |
||
130 | public function sendMessage($msg) |
||
134 | |||
135 | /** |
||
136 | * @param ReactPromise $promise |
||
137 | * |
||
138 | * @return PromiseAdapter |
||
139 | */ |
||
140 | private function createPromiseAdapter(ReactPromise $promise) |
||
144 | } |
||
145 |
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: