Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 473 |
|
0.00% |
0 / 4 |
CRAP | |
0.00% |
0 / 1 |
HTMLProgressElement | |
0.00% |
0 / 473 |
|
0.00% |
0 / 4 |
49952 | |
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 / 126 |
|
0.00% |
0 / 1 |
4160 | |||
__isset | |
0.00% |
0 / 126 |
|
0.00% |
0 / 1 |
4160 | |||
__set | |
0.00% |
0 / 83 |
|
0.00% |
0 / 1 |
870 | |||
__unset | |
0.00% |
0 / 138 |
|
0.00% |
0 / 1 |
4422 |
1 | <?php |
2 | |
3 | // AUTOMATICALLY GENERATED. DO NOT EDIT. |
4 | // Use `composer build` to regenerate. |
5 | |
6 | namespace Wikimedia\IDLeDOM\Helper; |
7 | |
8 | trait HTMLProgressElement { |
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\HTMLProgressElement $this'; |
44 | // @var \Wikimedia\IDLeDOM\HTMLProgressElement $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 "value": |
163 | return $this->getValue(); |
164 | case "max": |
165 | return $this->getMax(); |
166 | case "position": |
167 | return $this->getPosition(); |
168 | case "labels": |
169 | return $this->getLabels(); |
170 | default: |
171 | break; |
172 | } |
173 | '@phan-var \Wikimedia\IDLeDOM\Helper\HTMLProgressElement $this'; |
174 | // @var \Wikimedia\IDLeDOM\Helper\HTMLProgressElement $this |
175 | return $this->_getMissingProp( $name ); |
176 | } |
177 | |
178 | /** |
179 | * @param string $name |
180 | * @return bool |
181 | */ |
182 | public function __isset( string $name ): bool { |
183 | '@phan-var \Wikimedia\IDLeDOM\HTMLProgressElement $this'; |
184 | // @var \Wikimedia\IDLeDOM\HTMLProgressElement $this |
185 | switch ( $name ) { |
186 | case "nodeType": |
187 | return true; |
188 | case "nodeName": |
189 | return true; |
190 | case "baseURI": |
191 | return true; |
192 | case "isConnected": |
193 | return true; |
194 | case "ownerDocument": |
195 | return $this->getOwnerDocument() !== null; |
196 | case "parentNode": |
197 | return $this->getParentNode() !== null; |
198 | case "parentElement": |
199 | return $this->getParentElement() !== null; |
200 | case "childNodes": |
201 | return true; |
202 | case "firstChild": |
203 | return $this->getFirstChild() !== null; |
204 | case "lastChild": |
205 | return $this->getLastChild() !== null; |
206 | case "previousSibling": |
207 | return $this->getPreviousSibling() !== null; |
208 | case "nextSibling": |
209 | return $this->getNextSibling() !== null; |
210 | case "nodeValue": |
211 | return $this->getNodeValue() !== null; |
212 | case "textContent": |
213 | return $this->getTextContent() !== null; |
214 | case "innerHTML": |
215 | return true; |
216 | case "previousElementSibling": |
217 | return $this->getPreviousElementSibling() !== null; |
218 | case "nextElementSibling": |
219 | return $this->getNextElementSibling() !== null; |
220 | case "children": |
221 | return true; |
222 | case "firstElementChild": |
223 | return $this->getFirstElementChild() !== null; |
224 | case "lastElementChild": |
225 | return $this->getLastElementChild() !== null; |
226 | case "childElementCount": |
227 | return true; |
228 | case "assignedSlot": |
229 | return $this->getAssignedSlot() !== null; |
230 | case "namespaceURI": |
231 | return $this->getNamespaceURI() !== null; |
232 | case "prefix": |
233 | return $this->getPrefix() !== null; |
234 | case "localName": |
235 | return true; |
236 | case "tagName": |
237 | return true; |
238 | case "id": |
239 | return true; |
240 | case "className": |
241 | return true; |
242 | case "classList": |
243 | return true; |
244 | case "slot": |
245 | return true; |
246 | case "attributes": |
247 | return true; |
248 | case "shadowRoot": |
249 | return $this->getShadowRoot() !== null; |
250 | case "outerHTML": |
251 | return true; |
252 | case "style": |
253 | return true; |
254 | case "contentEditable": |
255 | return true; |
256 | case "enterKeyHint": |
257 | return true; |
258 | case "isContentEditable": |
259 | return true; |
260 | case "inputMode": |
261 | return true; |
262 | case "onload": |
263 | return true; |
264 | case "dataset": |
265 | return true; |
266 | case "nonce": |
267 | return true; |
268 | case "tabIndex": |
269 | return true; |
270 | case "title": |
271 | return true; |
272 | case "lang": |
273 | return true; |
274 | case "translate": |
275 | return true; |
276 | case "dir": |
277 | return true; |
278 | case "hidden": |
279 | return true; |
280 | case "accessKey": |
281 | return true; |
282 | case "accessKeyLabel": |
283 | return true; |
284 | case "draggable": |
285 | return true; |
286 | case "spellcheck": |
287 | return true; |
288 | case "autocapitalize": |
289 | return true; |
290 | case "innerText": |
291 | return true; |
292 | case "offsetParent": |
293 | return $this->getOffsetParent() !== null; |
294 | case "offsetTop": |
295 | return true; |
296 | case "offsetLeft": |
297 | return true; |
298 | case "offsetWidth": |
299 | return true; |
300 | case "offsetHeight": |
301 | return true; |
302 | case "value": |
303 | return true; |
304 | case "max": |
305 | return true; |
306 | case "position": |
307 | return true; |
308 | case "labels": |
309 | return true; |
310 | default: |
311 | break; |
312 | } |
313 | return false; |
314 | } |
315 | |
316 | /** |
317 | * @param string $name |
318 | * @param mixed $value |
319 | */ |
320 | public function __set( string $name, $value ): void { |
321 | '@phan-var \Wikimedia\IDLeDOM\HTMLProgressElement $this'; |
322 | // @var \Wikimedia\IDLeDOM\HTMLProgressElement $this |
323 | switch ( $name ) { |
324 | case "nodeValue": |
325 | $this->setNodeValue( $value ); |
326 | return; |
327 | case "textContent": |
328 | $this->setTextContent( $value ); |
329 | return; |
330 | case "innerHTML": |
331 | $this->setInnerHTML( $value ); |
332 | return; |
333 | case "id": |
334 | $this->setId( $value ); |
335 | return; |
336 | case "className": |
337 | $this->setClassName( $value ); |
338 | return; |
339 | case "classList": |
340 | $this->setClassList( $value ); |
341 | return; |
342 | case "slot": |
343 | $this->setSlot( $value ); |
344 | return; |
345 | case "outerHTML": |
346 | $this->setOuterHTML( $value ); |
347 | return; |
348 | case "style": |
349 | $this->setStyle( $value ); |
350 | return; |
351 | case "contentEditable": |
352 | $this->setContentEditable( $value ); |
353 | return; |
354 | case "enterKeyHint": |
355 | $this->setEnterKeyHint( $value ); |
356 | return; |
357 | case "inputMode": |
358 | $this->setInputMode( $value ); |
359 | return; |
360 | case "onload": |
361 | $this->setOnload( $value ); |
362 | return; |
363 | case "nonce": |
364 | $this->setNonce( $value ); |
365 | return; |
366 | case "tabIndex": |
367 | $this->setTabIndex( $value ); |
368 | return; |
369 | case "title": |
370 | $this->setTitle( $value ); |
371 | return; |
372 | case "lang": |
373 | $this->setLang( $value ); |
374 | return; |
375 | case "translate": |
376 | $this->setTranslate( $value ); |
377 | return; |
378 | case "dir": |
379 | $this->setDir( $value ); |
380 | return; |
381 | case "hidden": |
382 | $this->setHidden( $value ); |
383 | return; |
384 | case "accessKey": |
385 | $this->setAccessKey( $value ); |
386 | return; |
387 | case "draggable": |
388 | $this->setDraggable( $value ); |
389 | return; |
390 | case "spellcheck": |
391 | $this->setSpellcheck( $value ); |
392 | return; |
393 | case "autocapitalize": |
394 | $this->setAutocapitalize( $value ); |
395 | return; |
396 | case "innerText": |
397 | $this->setInnerText( $value ); |
398 | return; |
399 | case "value": |
400 | $this->setValue( $value ); |
401 | return; |
402 | case "max": |
403 | $this->setMax( $value ); |
404 | return; |
405 | default: |
406 | break; |
407 | } |
408 | '@phan-var \Wikimedia\IDLeDOM\Helper\HTMLProgressElement $this'; |
409 | // @var \Wikimedia\IDLeDOM\Helper\HTMLProgressElement $this |
410 | $this->_setMissingProp( $name, $value ); |
411 | } |
412 | |
413 | /** |
414 | * @param string $name |
415 | */ |
416 | public function __unset( string $name ): void { |
417 | '@phan-var \Wikimedia\IDLeDOM\HTMLProgressElement $this'; |
418 | // @var \Wikimedia\IDLeDOM\HTMLProgressElement $this |
419 | switch ( $name ) { |
420 | case "nodeType": |
421 | break; |
422 | case "nodeName": |
423 | break; |
424 | case "baseURI": |
425 | break; |
426 | case "isConnected": |
427 | break; |
428 | case "ownerDocument": |
429 | break; |
430 | case "parentNode": |
431 | break; |
432 | case "parentElement": |
433 | break; |
434 | case "childNodes": |
435 | break; |
436 | case "firstChild": |
437 | break; |
438 | case "lastChild": |
439 | break; |
440 | case "previousSibling": |
441 | break; |
442 | case "nextSibling": |
443 | break; |
444 | case "nodeValue": |
445 | $this->setNodeValue( null ); |
446 | return; |
447 | case "textContent": |
448 | $this->setTextContent( null ); |
449 | return; |
450 | case "innerHTML": |
451 | break; |
452 | case "previousElementSibling": |
453 | break; |
454 | case "nextElementSibling": |
455 | break; |
456 | case "children": |
457 | break; |
458 | case "firstElementChild": |
459 | break; |
460 | case "lastElementChild": |
461 | break; |
462 | case "childElementCount": |
463 | break; |
464 | case "assignedSlot": |
465 | break; |
466 | case "namespaceURI": |
467 | break; |
468 | case "prefix": |
469 | break; |
470 | case "localName": |
471 | break; |
472 | case "tagName": |
473 | break; |
474 | case "id": |
475 | break; |
476 | case "className": |
477 | break; |
478 | case "classList": |
479 | break; |
480 | case "slot": |
481 | break; |
482 | case "attributes": |
483 | break; |
484 | case "shadowRoot": |
485 | break; |
486 | case "outerHTML": |
487 | break; |
488 | case "style": |
489 | break; |
490 | case "contentEditable": |
491 | break; |
492 | case "enterKeyHint": |
493 | break; |
494 | case "isContentEditable": |
495 | break; |
496 | case "inputMode": |
497 | break; |
498 | case "onload": |
499 | break; |
500 | case "dataset": |
501 | break; |
502 | case "nonce": |
503 | break; |
504 | case "tabIndex": |
505 | break; |
506 | case "title": |
507 | break; |
508 | case "lang": |
509 | break; |
510 | case "translate": |
511 | break; |
512 | case "dir": |
513 | break; |
514 | case "hidden": |
515 | break; |
516 | case "accessKey": |
517 | break; |
518 | case "accessKeyLabel": |
519 | break; |
520 | case "draggable": |
521 | break; |
522 | case "spellcheck": |
523 | break; |
524 | case "autocapitalize": |
525 | break; |
526 | case "innerText": |
527 | break; |
528 | case "offsetParent": |
529 | break; |
530 | case "offsetTop": |
531 | break; |
532 | case "offsetLeft": |
533 | break; |
534 | case "offsetWidth": |
535 | break; |
536 | case "offsetHeight": |
537 | break; |
538 | case "value": |
539 | break; |
540 | case "max": |
541 | break; |
542 | case "position": |
543 | break; |
544 | case "labels": |
545 | break; |
546 | default: |
547 | return; |
548 | } |
549 | $trace = debug_backtrace(); |
550 | while ( |
551 | count( $trace ) > 0 && |
552 | $trace[0]['function'] !== "__unset" |
553 | ) { |
554 | array_shift( $trace ); |
555 | } |
556 | trigger_error( |
557 | 'Undefined property' . |
558 | ' via ' . ( $trace[0]['function'] ?? '' ) . '(): ' . $name . |
559 | ' in ' . ( $trace[0]['file'] ?? '' ) . |
560 | ' on line ' . ( $trace[0]['line'] ?? '' ), |
561 | E_USER_NOTICE |
562 | ); |
563 | } |
564 | |
565 | } |