1 | <?php |
||
5 | class Webhook |
||
6 | { |
||
7 | |||
8 | /** |
||
9 | * The unique identifier for the created entity |
||
10 | * @var string|null |
||
11 | */ |
||
12 | protected $id = null; |
||
13 | |||
14 | /** |
||
15 | * The URL to send the webhook POST to |
||
16 | * @var string |
||
17 | */ |
||
18 | protected $url; |
||
19 | |||
20 | /** |
||
21 | * The regular expression pattern to match against messages. |
||
22 | * Only applicable for message events. |
||
23 | * @var string |
||
24 | */ |
||
25 | protected $pattern; |
||
26 | |||
27 | /** |
||
28 | * The event to listen for |
||
29 | * Valid values: |
||
30 | * room_message, room_notification, room_exit, room_enter, room_topic_change. |
||
31 | * @var string |
||
32 | */ |
||
33 | protected $event; |
||
34 | |||
35 | /** |
||
36 | * The label for this webhook |
||
37 | * @var string |
||
38 | */ |
||
39 | protected $name; |
||
40 | |||
41 | /** |
||
42 | * URLs to retrieve webhook information |
||
43 | * @var array |
||
44 | */ |
||
45 | protected $links; |
||
46 | |||
47 | /** |
||
48 | * Webhook constructor |
||
49 | */ |
||
50 | public function __construct($json = null) |
||
62 | |||
63 | public function parseJson($json) |
||
72 | |||
73 | |||
74 | /** |
||
75 | * Serializes Webhook object |
||
76 | * |
||
77 | * @return array |
||
78 | */ |
||
79 | public function toJson() |
||
91 | |||
92 | /** |
||
93 | * Gets the unique identifier for the created entity |
||
94 | * @return null|string |
||
95 | */ |
||
96 | public function getId() |
||
100 | |||
101 | /** |
||
102 | * Sets the unique identifier for the created entity |
||
103 | * @param null|string $id |
||
104 | * @return self |
||
105 | */ |
||
106 | public function setId($id) |
||
111 | |||
112 | /** |
||
113 | * Gets the event to listen for |
||
114 | * |
||
115 | * @return string |
||
116 | */ |
||
117 | public function getEvent() { |
||
120 | |||
121 | /** |
||
122 | * Sets the event to listen for |
||
123 | * |
||
124 | * @param string $event |
||
125 | * @return self |
||
126 | */ |
||
127 | public function setEvent($event) { |
||
131 | |||
132 | /** |
||
133 | * Gets the URLs to retrieve webhook information |
||
134 | * @return array |
||
135 | */ |
||
136 | public function getLinks() |
||
140 | |||
141 | /** |
||
142 | * Sets the URLs to retrieve webhook information |
||
143 | * @param array $links |
||
144 | * @return self |
||
145 | */ |
||
146 | public function setLinks($links) |
||
151 | |||
152 | /** |
||
153 | * Gets the label for this webhook |
||
154 | * @return string |
||
155 | */ |
||
156 | public function getName() |
||
160 | |||
161 | /** |
||
162 | * Sets the label for this webhook |
||
163 | * @param string $name |
||
164 | * @return self |
||
165 | */ |
||
166 | public function setName($name) |
||
171 | |||
172 | /** |
||
173 | * Gets the regular expression pattern to match against messages. |
||
174 | * @return string |
||
175 | */ |
||
176 | public function getPattern() |
||
180 | |||
181 | /** |
||
182 | * Sets the regular expression pattern to match against messages. |
||
183 | * @param string $pattern |
||
184 | * @return self |
||
185 | */ |
||
186 | public function setPattern($pattern) |
||
191 | |||
192 | /** |
||
193 | * Gets the URL to send the webhook POST to |
||
194 | * @return string |
||
195 | */ |
||
196 | public function getUrl() |
||
200 | |||
201 | /** |
||
202 | * Sets the URL to send the webhook POST to |
||
203 | * @param string $url |
||
204 | * @return self |
||
205 | */ |
||
206 | public function setUrl($url) |
||
211 | |||
212 | } |
||
213 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..