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