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