Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 547
0.00% covered (danger)
0.00%
0 / 16
CRAP
0.00% covered (danger)
0.00%
0 / 1
HTMLMarqueeElement
0.00% covered (danger)
0.00%
0 / 547
0.00% covered (danger)
0.00%
0 / 16
68906
0.00% covered (danger)
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% covered (danger)
0.00%
0 / 138
0.00% covered (danger)
0.00%
0 / 1
4970
 __isset
0.00% covered (danger)
0.00%
0 / 138
0.00% covered (danger)
0.00%
0 / 1
4970
 __set
0.00% covered (danger)
0.00%
0 / 107
0.00% covered (danger)
0.00%
0 / 1
1406
 __unset
0.00% covered (danger)
0.00%
0 / 150
0.00% covered (danger)
0.00%
0 / 1
5256
 getBehavior
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setBehavior
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getBgColor
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setBgColor
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getDirection
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setDirection
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getHeight
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setHeight
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getTrueSpeed
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setTrueSpeed
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 1
6
 getWidth
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setWidth
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3// AUTOMATICALLY GENERATED.  DO NOT EDIT.
4// Use `composer build` to regenerate.
5
6namespace Wikimedia\IDLeDOM\Helper;
7
8trait HTMLMarqueeElement {
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\HTMLMarqueeElement $this';
44        // @var \Wikimedia\IDLeDOM\HTMLMarqueeElement $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 "behavior":
163                return $this->getBehavior();
164            case "bgColor":
165                return $this->getBgColor();
166            case "direction":
167                return $this->getDirection();
168            case "height":
169                return $this->getHeight();
170            case "hspace":
171                return $this->getHspace();
172            case "scrollAmount":
173                return $this->getScrollAmount();
174            case "scrollDelay":
175                return $this->getScrollDelay();
176            case "trueSpeed":
177                return $this->getTrueSpeed();
178            case "vspace":
179                return $this->getVspace();
180            case "width":
181                return $this->getWidth();
182            default:
183                break;
184        }
185        '@phan-var \Wikimedia\IDLeDOM\Helper\HTMLMarqueeElement $this';
186        // @var \Wikimedia\IDLeDOM\Helper\HTMLMarqueeElement $this
187        return $this->_getMissingProp( $name );
188    }
189
190    /**
191     * @param string $name
192     * @return bool
193     */
194    public function __isset( string $name ): bool {
195        '@phan-var \Wikimedia\IDLeDOM\HTMLMarqueeElement $this';
196        // @var \Wikimedia\IDLeDOM\HTMLMarqueeElement $this
197        switch ( $name ) {
198            case "nodeType":
199                return true;
200            case "nodeName":
201                return true;
202            case "baseURI":
203                return true;
204            case "isConnected":
205                return true;
206            case "ownerDocument":
207                return $this->getOwnerDocument() !== null;
208            case "parentNode":
209                return $this->getParentNode() !== null;
210            case "parentElement":
211                return $this->getParentElement() !== null;
212            case "childNodes":
213                return true;
214            case "firstChild":
215                return $this->getFirstChild() !== null;
216            case "lastChild":
217                return $this->getLastChild() !== null;
218            case "previousSibling":
219                return $this->getPreviousSibling() !== null;
220            case "nextSibling":
221                return $this->getNextSibling() !== null;
222            case "nodeValue":
223                return $this->getNodeValue() !== null;
224            case "textContent":
225                return $this->getTextContent() !== null;
226            case "innerHTML":
227                return true;
228            case "previousElementSibling":
229                return $this->getPreviousElementSibling() !== null;
230            case "nextElementSibling":
231                return $this->getNextElementSibling() !== null;
232            case "children":
233                return true;
234            case "firstElementChild":
235                return $this->getFirstElementChild() !== null;
236            case "lastElementChild":
237                return $this->getLastElementChild() !== null;
238            case "childElementCount":
239                return true;
240            case "assignedSlot":
241                return $this->getAssignedSlot() !== null;
242            case "namespaceURI":
243                return $this->getNamespaceURI() !== null;
244            case "prefix":
245                return $this->getPrefix() !== null;
246            case "localName":
247                return true;
248            case "tagName":
249                return true;
250            case "id":
251                return true;
252            case "className":
253                return true;
254            case "classList":
255                return true;
256            case "slot":
257                return true;
258            case "attributes":
259                return true;
260            case "shadowRoot":
261                return $this->getShadowRoot() !== null;
262            case "outerHTML":
263                return true;
264            case "style":
265                return true;
266            case "contentEditable":
267                return true;
268            case "enterKeyHint":
269                return true;
270            case "isContentEditable":
271                return true;
272            case "inputMode":
273                return true;
274            case "onload":
275                return true;
276            case "dataset":
277                return true;
278            case "nonce":
279                return true;
280            case "tabIndex":
281                return true;
282            case "title":
283                return true;
284            case "lang":
285                return true;
286            case "translate":
287                return true;
288            case "dir":
289                return true;
290            case "hidden":
291                return true;
292            case "accessKey":
293                return true;
294            case "accessKeyLabel":
295                return true;
296            case "draggable":
297                return true;
298            case "spellcheck":
299                return true;
300            case "autocapitalize":
301                return true;
302            case "innerText":
303                return true;
304            case "offsetParent":
305                return $this->getOffsetParent() !== null;
306            case "offsetTop":
307                return true;
308            case "offsetLeft":
309                return true;
310            case "offsetWidth":
311                return true;
312            case "offsetHeight":
313                return true;
314            case "behavior":
315                return true;
316            case "bgColor":
317                return true;
318            case "direction":
319                return true;
320            case "height":
321                return true;
322            case "hspace":
323                return true;
324            case "scrollAmount":
325                return true;
326            case "scrollDelay":
327                return true;
328            case "trueSpeed":
329                return true;
330            case "vspace":
331                return true;
332            case "width":
333                return true;
334            default:
335                break;
336        }
337        return false;
338    }
339
340    /**
341     * @param string $name
342     * @param mixed $value
343     */
344    public function __set( string $name, $value ): void {
345        '@phan-var \Wikimedia\IDLeDOM\HTMLMarqueeElement $this';
346        // @var \Wikimedia\IDLeDOM\HTMLMarqueeElement $this
347        switch ( $name ) {
348            case "nodeValue":
349                $this->setNodeValue( $value );
350                return;
351            case "textContent":
352                $this->setTextContent( $value );
353                return;
354            case "innerHTML":
355                $this->setInnerHTML( $value );
356                return;
357            case "id":
358                $this->setId( $value );
359                return;
360            case "className":
361                $this->setClassName( $value );
362                return;
363            case "classList":
364                $this->setClassList( $value );
365                return;
366            case "slot":
367                $this->setSlot( $value );
368                return;
369            case "outerHTML":
370                $this->setOuterHTML( $value );
371                return;
372            case "style":
373                $this->setStyle( $value );
374                return;
375            case "contentEditable":
376                $this->setContentEditable( $value );
377                return;
378            case "enterKeyHint":
379                $this->setEnterKeyHint( $value );
380                return;
381            case "inputMode":
382                $this->setInputMode( $value );
383                return;
384            case "onload":
385                $this->setOnload( $value );
386                return;
387            case "nonce":
388                $this->setNonce( $value );
389                return;
390            case "tabIndex":
391                $this->setTabIndex( $value );
392                return;
393            case "title":
394                $this->setTitle( $value );
395                return;
396            case "lang":
397                $this->setLang( $value );
398                return;
399            case "translate":
400                $this->setTranslate( $value );
401                return;
402            case "dir":
403                $this->setDir( $value );
404                return;
405            case "hidden":
406                $this->setHidden( $value );
407                return;
408            case "accessKey":
409                $this->setAccessKey( $value );
410                return;
411            case "draggable":
412                $this->setDraggable( $value );
413                return;
414            case "spellcheck":
415                $this->setSpellcheck( $value );
416                return;
417            case "autocapitalize":
418                $this->setAutocapitalize( $value );
419                return;
420            case "innerText":
421                $this->setInnerText( $value );
422                return;
423            case "behavior":
424                $this->setBehavior( $value );
425                return;
426            case "bgColor":
427                $this->setBgColor( $value );
428                return;
429            case "direction":
430                $this->setDirection( $value );
431                return;
432            case "height":
433                $this->setHeight( $value );
434                return;
435            case "hspace":
436                $this->setHspace( $value );
437                return;
438            case "scrollAmount":
439                $this->setScrollAmount( $value );
440                return;
441            case "scrollDelay":
442                $this->setScrollDelay( $value );
443                return;
444            case "trueSpeed":
445                $this->setTrueSpeed( $value );
446                return;
447            case "vspace":
448                $this->setVspace( $value );
449                return;
450            case "width":
451                $this->setWidth( $value );
452                return;
453            default:
454                break;
455        }
456        '@phan-var \Wikimedia\IDLeDOM\Helper\HTMLMarqueeElement $this';
457        // @var \Wikimedia\IDLeDOM\Helper\HTMLMarqueeElement $this
458        $this->_setMissingProp( $name, $value );
459    }
460
461    /**
462     * @param string $name
463     */
464    public function __unset( string $name ): void {
465        '@phan-var \Wikimedia\IDLeDOM\HTMLMarqueeElement $this';
466        // @var \Wikimedia\IDLeDOM\HTMLMarqueeElement $this
467        switch ( $name ) {
468            case "nodeType":
469                break;
470            case "nodeName":
471                break;
472            case "baseURI":
473                break;
474            case "isConnected":
475                break;
476            case "ownerDocument":
477                break;
478            case "parentNode":
479                break;
480            case "parentElement":
481                break;
482            case "childNodes":
483                break;
484            case "firstChild":
485                break;
486            case "lastChild":
487                break;
488            case "previousSibling":
489                break;
490            case "nextSibling":
491                break;
492            case "nodeValue":
493                $this->setNodeValue( null );
494                return;
495            case "textContent":
496                $this->setTextContent( null );
497                return;
498            case "innerHTML":
499                break;
500            case "previousElementSibling":
501                break;
502            case "nextElementSibling":
503                break;
504            case "children":
505                break;
506            case "firstElementChild":
507                break;
508            case "lastElementChild":
509                break;
510            case "childElementCount":
511                break;
512            case "assignedSlot":
513                break;
514            case "namespaceURI":
515                break;
516            case "prefix":
517                break;
518            case "localName":
519                break;
520            case "tagName":
521                break;
522            case "id":
523                break;
524            case "className":
525                break;
526            case "classList":
527                break;
528            case "slot":
529                break;
530            case "attributes":
531                break;
532            case "shadowRoot":
533                break;
534            case "outerHTML":
535                break;
536            case "style":
537                break;
538            case "contentEditable":
539                break;
540            case "enterKeyHint":
541                break;
542            case "isContentEditable":
543                break;
544            case "inputMode":
545                break;
546            case "onload":
547                break;
548            case "dataset":
549                break;
550            case "nonce":
551                break;
552            case "tabIndex":
553                break;
554            case "title":
555                break;
556            case "lang":
557                break;
558            case "translate":
559                break;
560            case "dir":
561                break;
562            case "hidden":
563                break;
564            case "accessKey":
565                break;
566            case "accessKeyLabel":
567                break;
568            case "draggable":
569                break;
570            case "spellcheck":
571                break;
572            case "autocapitalize":
573                break;
574            case "innerText":
575                break;
576            case "offsetParent":
577                break;
578            case "offsetTop":
579                break;
580            case "offsetLeft":
581                break;
582            case "offsetWidth":
583                break;
584            case "offsetHeight":
585                break;
586            case "behavior":
587                break;
588            case "bgColor":
589                break;
590            case "direction":
591                break;
592            case "height":
593                break;
594            case "hspace":
595                break;
596            case "scrollAmount":
597                break;
598            case "scrollDelay":
599                break;
600            case "trueSpeed":
601                break;
602            case "vspace":
603                break;
604            case "width":
605                break;
606            default:
607                return;
608        }
609        $trace = debug_backtrace();
610        while (
611            count( $trace ) > 0 &&
612            $trace[0]['function'] !== "__unset"
613        ) {
614            array_shift( $trace );
615        }
616        trigger_error(
617            'Undefined property' .
618            ' via ' . ( $trace[0]['function'] ?? '' ) . '(): ' . $name .
619            ' in ' . ( $trace[0]['file'] ?? '' ) .
620            ' on line ' . ( $trace[0]['line'] ?? '' ),
621            E_USER_NOTICE
622        );
623    }
624
625    /**
626     * @return string
627     */
628    public function getBehavior(): string {
629        '@phan-var \Wikimedia\IDLeDOM\Element $this';
630        // @var \Wikimedia\IDLeDOM\Element $this
631        return $this->getAttribute( 'behavior' ) ?? '';
632    }
633
634    /**
635     * @param string $val
636     */
637    public function setBehavior( string $val ): void {
638        '@phan-var \Wikimedia\IDLeDOM\Element $this';
639        // @var \Wikimedia\IDLeDOM\Element $this
640        $this->setAttribute( 'behavior', $val );
641    }
642
643    /**
644     * @return string
645     */
646    public function getBgColor(): string {
647        '@phan-var \Wikimedia\IDLeDOM\Element $this';
648        // @var \Wikimedia\IDLeDOM\Element $this
649        return $this->getAttribute( 'bgcolor' ) ?? '';
650    }
651
652    /**
653     * @param string $val
654     */
655    public function setBgColor( string $val ): void {
656        '@phan-var \Wikimedia\IDLeDOM\Element $this';
657        // @var \Wikimedia\IDLeDOM\Element $this
658        $this->setAttribute( 'bgcolor', $val );
659    }
660
661    /**
662     * @return string
663     */
664    public function getDirection(): string {
665        '@phan-var \Wikimedia\IDLeDOM\Element $this';
666        // @var \Wikimedia\IDLeDOM\Element $this
667        return $this->getAttribute( 'direction' ) ?? '';
668    }
669
670    /**
671     * @param string $val
672     */
673    public function setDirection( string $val ): void {
674        '@phan-var \Wikimedia\IDLeDOM\Element $this';
675        // @var \Wikimedia\IDLeDOM\Element $this
676        $this->setAttribute( 'direction', $val );
677    }
678
679    /**
680     * @return string
681     */
682    public function getHeight(): string {
683        '@phan-var \Wikimedia\IDLeDOM\Element $this';
684        // @var \Wikimedia\IDLeDOM\Element $this
685        return $this->getAttribute( 'height' ) ?? '';
686    }
687
688    /**
689     * @param string $val
690     */
691    public function setHeight( string $val ): void {
692        '@phan-var \Wikimedia\IDLeDOM\Element $this';
693        // @var \Wikimedia\IDLeDOM\Element $this
694        $this->setAttribute( 'height', $val );
695    }
696
697    /**
698     * @return bool
699     */
700    public function getTrueSpeed(): bool {
701        '@phan-var \Wikimedia\IDLeDOM\Element $this';
702        // @var \Wikimedia\IDLeDOM\Element $this
703        return $this->hasAttribute( 'truespeed' );
704    }
705
706    /**
707     * @param bool $val
708     */
709    public function setTrueSpeed( bool $val ): void {
710        '@phan-var \Wikimedia\IDLeDOM\Element $this';
711        // @var \Wikimedia\IDLeDOM\Element $this
712        if ( $val ) {
713            $this->setAttribute( 'truespeed', '' );
714        } else {
715            $this->removeAttribute( 'truespeed' );
716        }
717    }
718
719    /**
720     * @return string
721     */
722    public function getWidth(): string {
723        '@phan-var \Wikimedia\IDLeDOM\Element $this';
724        // @var \Wikimedia\IDLeDOM\Element $this
725        return $this->getAttribute( 'width' ) ?? '';
726    }
727
728    /**
729     * @param string $val
730     */
731    public function setWidth( string $val ): void {
732        '@phan-var \Wikimedia\IDLeDOM\Element $this';
733        // @var \Wikimedia\IDLeDOM\Element $this
734        $this->setAttribute( 'width', $val );
735    }
736
737}