1 | <?php |
||
33 | class Stanza extends XmlElement implements XmlFactoryCollocations |
||
34 | { |
||
35 | private $_from = false; |
||
36 | private $_to = false; |
||
37 | |||
38 | /** |
||
39 | * Stanza constructor. |
||
40 | * @param string $kind Stanza kind. According to XMPP RFC, one of "iq", "message", "presence" |
||
41 | * @param array $options { |
||
42 | * @var Jid $from Jid representing "from" stanza attribute |
||
43 | * @var Jid $to Jid representing "to" stanza attribute |
||
44 | * @var string $id Unique id, will be generated if omitted |
||
45 | * @var string $type Stanza type |
||
46 | * } |
||
47 | */ |
||
48 | public function __construct(string $kind, array $options = []) |
||
53 | |||
54 | public function getFrom() |
||
62 | |||
63 | public function getTo() |
||
71 | |||
72 | public function getType() |
||
76 | |||
77 | public function getId() |
||
81 | |||
82 | public function getError() |
||
86 | |||
87 | public function setFrom($from) |
||
95 | |||
96 | public function setTo($to) |
||
104 | |||
105 | public function setType(string $type) |
||
109 | |||
110 | public function setId(string $id) |
||
114 | |||
115 | public function regenerateId(string $prefix = null) |
||
119 | |||
120 | public function response() |
||
130 | |||
131 | /** |
||
132 | * Initializes element with given name and URI |
||
133 | * |
||
134 | * @param string $name Element name, including prefix if needed |
||
135 | * @param string $uri Namespace URI of element |
||
136 | */ |
||
137 | protected function init(string $name, string $uri = null) |
||
142 | |||
143 | public static function getXmlCollocations() : array |
||
149 | } |
||
150 |
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: