1 | <?php |
||
33 | class Item extends XmlElement |
||
34 | { |
||
35 | public function __construct(Jid $jid, array $options = []) |
||
40 | |||
41 | #region Approved |
||
42 | /** |
||
43 | * @return bool |
||
44 | */ |
||
45 | public function getApproved(): bool |
||
49 | |||
50 | /** |
||
51 | * @param bool $approved |
||
52 | */ |
||
53 | public function setApproved(bool $approved) |
||
57 | #endregion |
||
58 | |||
59 | #region Ask |
||
60 | /** |
||
61 | * @return string |
||
62 | */ |
||
63 | public function getAsk(): string |
||
67 | |||
68 | /** |
||
69 | * @param string $ask |
||
70 | */ |
||
71 | public function setAsk(string $ask) |
||
75 | #endregion |
||
76 | |||
77 | #region Jid |
||
78 | /** |
||
79 | * @return Jid |
||
80 | */ |
||
81 | public function getJid(): Jid |
||
85 | |||
86 | /** |
||
87 | * @param Jid $jid |
||
88 | */ |
||
89 | public function setJid(Jid $jid) |
||
93 | #endregion |
||
94 | |||
95 | #region Name |
||
96 | /** |
||
97 | * @return string |
||
98 | */ |
||
99 | public function getName(): string |
||
103 | |||
104 | /** |
||
105 | * @param string $name |
||
106 | */ |
||
107 | public function setName(string $name) |
||
111 | #endregion |
||
112 | |||
113 | #region Subscription |
||
114 | /** |
||
115 | * @return string |
||
116 | */ |
||
117 | public function getSubscription(): string |
||
121 | |||
122 | /** |
||
123 | * @param string $subscription |
||
124 | */ |
||
125 | public function setSubscription(string $subscription) |
||
129 | #endregion |
||
130 | |||
131 | #region Groups |
||
132 | /** |
||
133 | * @return string[] |
||
134 | */ |
||
135 | public function getGroups(): array |
||
141 | |||
142 | public function setGroups(array $groups) |
||
147 | #endregion |
||
148 | } |
||
149 |
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: