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