Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 449 |
|
0.00% |
0 / 4 |
CRAP | |
0.00% |
0 / 1 |
HTMLDataListElement | |
0.00% |
0 / 449 |
|
0.00% |
0 / 4 |
45156 | |
0.00% |
0 / 1 |
_getMissingProp | n/a |
0 / 0 |
n/a |
0 / 0 |
0 | |||||
_setMissingProp | n/a |
0 / 0 |
n/a |
0 / 0 |
0 | |||||
__get | |
0.00% |
0 / 120 |
|
0.00% |
0 / 1 |
3782 | |||
__isset | |
0.00% |
0 / 120 |
|
0.00% |
0 / 1 |
3782 | |||
__set | |
0.00% |
0 / 77 |
|
0.00% |
0 / 1 |
756 | |||
__unset | |
0.00% |
0 / 132 |
|
0.00% |
0 / 1 |
4032 |
1 | <?php |
2 | |
3 | // AUTOMATICALLY GENERATED. DO NOT EDIT. |
4 | // Use `composer build` to regenerate. |
5 | |
6 | namespace Wikimedia\IDLeDOM\Helper; |
7 | |
8 | trait HTMLDataListElement { |
9 | |
10 | // Underscore is used to avoid conflicts with DOM-reserved names |
11 | // phpcs:disable PSR2.Methods.MethodDeclaration.Underscore |
12 | // phpcs:disable MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName |
13 | |
14 | /** |
15 | * Handle an attempt to get a non-existing property on this |
16 | * object. The default implementation raises an exception |
17 | * but the implementor can choose a different behavior: |
18 | * return null (like JavaScript), dynamically create the |
19 | * property, etc. |
20 | * @param string $prop the name of the property requested |
21 | * @return mixed |
22 | */ |
23 | abstract protected function _getMissingProp( string $prop ); |
24 | |
25 | /** |
26 | * Handle an attempt to set a non-existing property on this |
27 | * object. The default implementation raises an exception |
28 | * but the implementor can choose a different behavior: |
29 | * ignore the operation (like JavaScript), dynamically create |
30 | * the property, etc. |
31 | * @param string $prop the name of the property requested |
32 | * @param mixed $value the value to set |
33 | */ |
34 | abstract protected function _setMissingProp( string $prop, $value ): void; |
35 | |
36 | // phpcs:enable |
37 | |
38 | /** |
39 | * @param string $name |
40 | * @return mixed |
41 | */ |
42 | public function __get( string $name ) { |
43 | '@phan-var \Wikimedia\IDLeDOM\HTMLDataListElement $this'; |
44 | // @var \Wikimedia\IDLeDOM\HTMLDataListElement $this |
45 | switch ( $name ) { |
46 | case "nodeType": |
47 | return $this->getNodeType(); |
48 | case "nodeName": |
49 | return $this->getNodeName(); |
50 | case "baseURI": |
51 | return $this->getBaseURI(); |
52 | case "isConnected": |
53 | return $this->getIsConnected(); |
54 | case "ownerDocument": |
55 | return $this->getOwnerDocument(); |
56 | case "parentNode": |
57 | return $this->getParentNode(); |
58 | case "parentElement": |
59 | return $this->getParentElement(); |
60 | case "childNodes": |
61 | return $this->getChildNodes(); |
62 | case "firstChild": |
63 | return $this->getFirstChild(); |
64 | case "lastChild": |
65 | return $this->getLastChild(); |
66 | case "previousSibling": |
67 | return $this->getPreviousSibling(); |
68 | case "nextSibling": |
69 | return $this->getNextSibling(); |
70 | case "nodeValue": |
71 | return $this->getNodeValue(); |
72 | case "textContent": |
73 | return $this->getTextContent(); |
74 | case "innerHTML": |
75 | return $this->getInnerHTML(); |
76 | case "previousElementSibling": |
77 | return $this->getPreviousElementSibling(); |
78 | case "nextElementSibling": |
79 | return $this->getNextElementSibling(); |
80 | case "children": |
81 | return $this->getChildren(); |
82 | case "firstElementChild": |
83 | return $this->getFirstElementChild(); |
84 | case "lastElementChild": |
85 | return $this->getLastElementChild(); |
86 | case "childElementCount": |
87 | return $this->getChildElementCount(); |
88 | case "assignedSlot": |
89 | return $this->getAssignedSlot(); |
90 | case "namespaceURI": |
91 | return $this->getNamespaceURI(); |
92 | case "prefix": |
93 | return $this->getPrefix(); |
94 | case "localName": |
95 | return $this->getLocalName(); |
96 | case "tagName": |
97 | return $this->getTagName(); |
98 | case "id": |
99 | return $this->getId(); |
100 | case "className": |
101 | return $this->getClassName(); |
102 | case "classList": |
103 | return $this->getClassList(); |
104 | case "slot": |
105 | return $this->getSlot(); |
106 | case "attributes": |
107 | return $this->getAttributes(); |
108 | case "shadowRoot": |
109 | return $this->getShadowRoot(); |
110 | case "outerHTML": |
111 | return $this->getOuterHTML(); |
112 | case "style": |
113 | return $this->getStyle(); |
114 | case "contentEditable": |
115 | return $this->getContentEditable(); |
116 | case "enterKeyHint": |
117 | return $this->getEnterKeyHint(); |
118 | case "isContentEditable": |
119 | return $this->getIsContentEditable(); |
120 | case "inputMode": |
121 | return $this->getInputMode(); |
122 | case "onload": |
123 | return $this->getOnload(); |
124 | case "dataset": |
125 | return $this->getDataset(); |
126 | case "nonce": |
127 | return $this->getNonce(); |
128 | case "tabIndex": |
129 | return $this->getTabIndex(); |
130 | case "title": |
131 | return $this->getTitle(); |
132 | case "lang": |
133 | return $this->getLang(); |
134 | case "translate": |
135 | return $this->getTranslate(); |
136 | case "dir": |
137 | return $this->getDir(); |
138 | case "hidden": |
139 | return $this->getHidden(); |
140 | case "accessKey": |
141 | return $this->getAccessKey(); |
142 | case "accessKeyLabel": |
143 | return $this->getAccessKeyLabel(); |
144 | case "draggable": |
145 | return $this->getDraggable(); |
146 | case "spellcheck": |
147 | return $this->getSpellcheck(); |
148 | case "autocapitalize": |
149 | return $this->getAutocapitalize(); |
150 | case "innerText": |
151 | return $this->getInnerText(); |
152 | case "offsetParent": |
153 | return $this->getOffsetParent(); |
154 | case "offsetTop": |
155 | return $this->getOffsetTop(); |
156 | case "offsetLeft": |
157 | return $this->getOffsetLeft(); |
158 | case "offsetWidth": |
159 | return $this->getOffsetWidth(); |
160 | case "offsetHeight": |
161 | return $this->getOffsetHeight(); |
162 | case "options": |
163 | return $this->getOptions(); |
164 | default: |
165 | break; |
166 | } |
167 | '@phan-var \Wikimedia\IDLeDOM\Helper\HTMLDataListElement $this'; |
168 | // @var \Wikimedia\IDLeDOM\Helper\HTMLDataListElement $this |
169 | return $this->_getMissingProp( $name ); |
170 | } |
171 | |
172 | /** |
173 | * @param string $name |
174 | * @return bool |
175 | */ |
176 | public function __isset( string $name ): bool { |
177 | '@phan-var \Wikimedia\IDLeDOM\HTMLDataListElement $this'; |
178 | // @var \Wikimedia\IDLeDOM\HTMLDataListElement $this |
179 | switch ( $name ) { |
180 | case "nodeType": |
181 | return true; |
182 | case "nodeName": |
183 | return true; |
184 | case "baseURI": |
185 | return true; |
186 | case "isConnected": |
187 | return true; |
188 | case "ownerDocument": |
189 | return $this->getOwnerDocument() !== null; |
190 | case "parentNode": |
191 | return $this->getParentNode() !== null; |
192 | case "parentElement": |
193 | return $this->getParentElement() !== null; |
194 | case "childNodes": |
195 | return true; |
196 | case "firstChild": |
197 | return $this->getFirstChild() !== null; |
198 | case "lastChild": |
199 | return $this->getLastChild() !== null; |
200 | case "previousSibling": |
201 | return $this->getPreviousSibling() !== null; |
202 | case "nextSibling": |
203 | return $this->getNextSibling() !== null; |
204 | case "nodeValue": |
205 | return $this->getNodeValue() !== null; |
206 | case "textContent": |
207 | return $this->getTextContent() !== null; |
208 | case "innerHTML": |
209 | return true; |
210 | case "previousElementSibling": |
211 | return $this->getPreviousElementSibling() !== null; |
212 | case "nextElementSibling": |
213 | return $this->getNextElementSibling() !== null; |
214 | case "children": |
215 | return true; |
216 | case "firstElementChild": |
217 | return $this->getFirstElementChild() !== null; |
218 | case "lastElementChild": |
219 | return $this->getLastElementChild() !== null; |
220 | case "childElementCount": |
221 | return true; |
222 | case "assignedSlot": |
223 | return $this->getAssignedSlot() !== null; |
224 | case "namespaceURI": |
225 | return $this->getNamespaceURI() !== null; |
226 | case "prefix": |
227 | return $this->getPrefix() !== null; |
228 | case "localName": |
229 | return true; |
230 | case "tagName": |
231 | return true; |
232 | case "id": |
233 | return true; |
234 | case "className": |
235 | return true; |
236 | case "classList": |
237 | return true; |
238 | case "slot": |
239 | return true; |
240 | case "attributes": |
241 | return true; |
242 | case "shadowRoot": |
243 | return $this->getShadowRoot() !== null; |
244 | case "outerHTML": |
245 | return true; |
246 | case "style": |
247 | return true; |
248 | case "contentEditable": |
249 | return true; |
250 | case "enterKeyHint": |
251 | return true; |
252 | case "isContentEditable": |
253 | return true; |
254 | case "inputMode": |
255 | return true; |
256 | case "onload": |
257 | return true; |
258 | case "dataset": |
259 | return true; |
260 | case "nonce": |
261 | return true; |
262 | case "tabIndex": |
263 | return true; |
264 | case "title": |
265 | return true; |
266 | case "lang": |
267 | return true; |
268 | case "translate": |
269 | return true; |
270 | case "dir": |
271 | return true; |
272 | case "hidden": |
273 | return true; |
274 | case "accessKey": |
275 | return true; |
276 | case "accessKeyLabel": |
277 | return true; |
278 | case "draggable": |
279 | return true; |
280 | case "spellcheck": |
281 | return true; |
282 | case "autocapitalize": |
283 | return true; |
284 | case "innerText": |
285 | return true; |
286 | case "offsetParent": |
287 | return $this->getOffsetParent() !== null; |
288 | case "offsetTop": |
289 | return true; |
290 | case "offsetLeft": |
291 | return true; |
292 | case "offsetWidth": |
293 | return true; |
294 | case "offsetHeight": |
295 | return true; |
296 | case "options": |
297 | return true; |
298 | default: |
299 | break; |
300 | } |
301 | return false; |
302 | } |
303 | |
304 | /** |
305 | * @param string $name |
306 | * @param mixed $value |
307 | */ |
308 | public function __set( string $name, $value ): void { |
309 | '@phan-var \Wikimedia\IDLeDOM\HTMLDataListElement $this'; |
310 | // @var \Wikimedia\IDLeDOM\HTMLDataListElement $this |
311 | switch ( $name ) { |
312 | case "nodeValue": |
313 | $this->setNodeValue( $value ); |
314 | return; |
315 | case "textContent": |
316 | $this->setTextContent( $value ); |
317 | return; |
318 | case "innerHTML": |
319 | $this->setInnerHTML( $value ); |
320 | return; |
321 | case "id": |
322 | $this->setId( $value ); |
323 | return; |
324 | case "className": |
325 | $this->setClassName( $value ); |
326 | return; |
327 | case "classList": |
328 | $this->setClassList( $value ); |
329 | return; |
330 | case "slot": |
331 | $this->setSlot( $value ); |
332 | return; |
333 | case "outerHTML": |
334 | $this->setOuterHTML( $value ); |
335 | return; |
336 | case "style": |
337 | $this->setStyle( $value ); |
338 | return; |
339 | case "contentEditable": |
340 | $this->setContentEditable( $value ); |
341 | return; |
342 | case "enterKeyHint": |
343 | $this->setEnterKeyHint( $value ); |
344 | return; |
345 | case "inputMode": |
346 | $this->setInputMode( $value ); |
347 | return; |
348 | case "onload": |
349 | $this->setOnload( $value ); |
350 | return; |
351 | case "nonce": |
352 | $this->setNonce( $value ); |
353 | return; |
354 | case "tabIndex": |
355 | $this->setTabIndex( $value ); |
356 | return; |
357 | case "title": |
358 | $this->setTitle( $value ); |
359 | return; |
360 | case "lang": |
361 | $this->setLang( $value ); |
362 | return; |
363 | case "translate": |
364 | $this->setTranslate( $value ); |
365 | return; |
366 | case "dir": |
367 | $this->setDir( $value ); |
368 | return; |
369 | case "hidden": |
370 | $this->setHidden( $value ); |
371 | return; |
372 | case "accessKey": |
373 | $this->setAccessKey( $value ); |
374 | return; |
375 | case "draggable": |
376 | $this->setDraggable( $value ); |
377 | return; |
378 | case "spellcheck": |
379 | $this->setSpellcheck( $value ); |
380 | return; |
381 | case "autocapitalize": |
382 | $this->setAutocapitalize( $value ); |
383 | return; |
384 | case "innerText": |
385 | $this->setInnerText( $value ); |
386 | return; |
387 | default: |
388 | break; |
389 | } |
390 | '@phan-var \Wikimedia\IDLeDOM\Helper\HTMLDataListElement $this'; |
391 | // @var \Wikimedia\IDLeDOM\Helper\HTMLDataListElement $this |
392 | $this->_setMissingProp( $name, $value ); |
393 | } |
394 | |
395 | /** |
396 | * @param string $name |
397 | */ |
398 | public function __unset( string $name ): void { |
399 | '@phan-var \Wikimedia\IDLeDOM\HTMLDataListElement $this'; |
400 | // @var \Wikimedia\IDLeDOM\HTMLDataListElement $this |
401 | switch ( $name ) { |
402 | case "nodeType": |
403 | break; |
404 | case "nodeName": |
405 | break; |
406 | case "baseURI": |
407 | break; |
408 | case "isConnected": |
409 | break; |
410 | case "ownerDocument": |
411 | break; |
412 | case "parentNode": |
413 | break; |
414 | case "parentElement": |
415 | break; |
416 | case "childNodes": |
417 | break; |
418 | case "firstChild": |
419 | break; |
420 | case "lastChild": |
421 | break; |
422 | case "previousSibling": |
423 | break; |
424 | case "nextSibling": |
425 | break; |
426 | case "nodeValue": |
427 | $this->setNodeValue( null ); |
428 | return; |
429 | case "textContent": |
430 | $this->setTextContent( null ); |
431 | return; |
432 | case "innerHTML": |
433 | break; |
434 | case "previousElementSibling": |
435 | break; |
436 | case "nextElementSibling": |
437 | break; |
438 | case "children": |
439 | break; |
440 | case "firstElementChild": |
441 | break; |
442 | case "lastElementChild": |
443 | break; |
444 | case "childElementCount": |
445 | break; |
446 | case "assignedSlot": |
447 | break; |
448 | case "namespaceURI": |
449 | break; |
450 | case "prefix": |
451 | break; |
452 | case "localName": |
453 | break; |
454 | case "tagName": |
455 | break; |
456 | case "id": |
457 | break; |
458 | case "className": |
459 | break; |
460 | case "classList": |
461 | break; |
462 | case "slot": |
463 | break; |
464 | case "attributes": |
465 | break; |
466 | case "shadowRoot": |
467 | break; |
468 | case "outerHTML": |
469 | break; |
470 | case "style": |
471 | break; |
472 | case "contentEditable": |
473 | break; |
474 | case "enterKeyHint": |
475 | break; |
476 | case "isContentEditable": |
477 | break; |
478 | case "inputMode": |
479 | break; |
480 | case "onload": |
481 | break; |
482 | case "dataset": |
483 | break; |
484 | case "nonce": |
485 | break; |
486 | case "tabIndex": |
487 | break; |
488 | case "title": |
489 | break; |
490 | case "lang": |
491 | break; |
492 | case "translate": |
493 | break; |
494 | case "dir": |
495 | break; |
496 | case "hidden": |
497 | break; |
498 | case "accessKey": |
499 | break; |
500 | case "accessKeyLabel": |
501 | break; |
502 | case "draggable": |
503 | break; |
504 | case "spellcheck": |
505 | break; |
506 | case "autocapitalize": |
507 | break; |
508 | case "innerText": |
509 | break; |
510 | case "offsetParent": |
511 | break; |
512 | case "offsetTop": |
513 | break; |
514 | case "offsetLeft": |
515 | break; |
516 | case "offsetWidth": |
517 | break; |
518 | case "offsetHeight": |
519 | break; |
520 | case "options": |
521 | break; |
522 | default: |
523 | return; |
524 | } |
525 | $trace = debug_backtrace(); |
526 | while ( |
527 | count( $trace ) > 0 && |
528 | $trace[0]['function'] !== "__unset" |
529 | ) { |
530 | array_shift( $trace ); |
531 | } |
532 | trigger_error( |
533 | 'Undefined property' . |
534 | ' via ' . ( $trace[0]['function'] ?? '' ) . '(): ' . $name . |
535 | ' in ' . ( $trace[0]['file'] ?? '' ) . |
536 | ' on line ' . ( $trace[0]['line'] ?? '' ), |
537 | E_USER_NOTICE |
538 | ); |
539 | } |
540 | |
541 | } |