Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 680
0.00% covered (danger)
0.00%
0 / 22
CRAP
0.00% covered (danger)
0.00%
0 / 1
HTMLTextAreaElement
0.00% covered (danger)
0.00%
0 / 680
0.00% covered (danger)
0.00%
0 / 22
107912
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 / 168
0.00% covered (danger)
0.00%
0 / 1
7310
 __isset
0.00% covered (danger)
0.00%
0 / 168
0.00% covered (danger)
0.00%
0 / 1
7310
 __set
0.00% covered (danger)
0.00%
0 / 131
0.00% covered (danger)
0.00%
0 / 1
2070
 __unset
0.00% covered (danger)
0.00%
0 / 180
0.00% covered (danger)
0.00%
0 / 1
7656
 getAutocomplete
0.00% covered (danger)
0.00%
0 / 8
0.00% covered (danger)
0.00%
0 / 1
30
 setAutocomplete
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getAutofocus
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setAutofocus
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 1
6
 getDirName
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setDirName
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getDisabled
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setDisabled
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 1
6
 getName
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setName
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getPlaceholder
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setPlaceholder
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getReadOnly
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setReadOnly
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 1
6
 getRequired
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setRequired
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 1
6
 getWrap
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 setWrap
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 HTMLTextAreaElement {
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\HTMLTextAreaElement $this';
44        // @var \Wikimedia\IDLeDOM\HTMLTextAreaElement $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 "autocomplete":
163                return $this->getAutocomplete();
164            case "autofocus":
165                return $this->getAutofocus();
166            case "cols":
167                return $this->getCols();
168            case "dirName":
169                return $this->getDirName();
170            case "disabled":
171                return $this->getDisabled();
172            case "form":
173                return $this->getForm();
174            case "maxLength":
175                return $this->getMaxLength();
176            case "minLength":
177                return $this->getMinLength();
178            case "name":
179                return $this->getName();
180            case "placeholder":
181                return $this->getPlaceholder();
182            case "readOnly":
183                return $this->getReadOnly();
184            case "required":
185                return $this->getRequired();
186            case "rows":
187                return $this->getRows();
188            case "wrap":
189                return $this->getWrap();
190            case "type":
191                return $this->getType();
192            case "defaultValue":
193                return $this->getDefaultValue();
194            case "value":
195                return $this->getValue();
196            case "textLength":
197                return $this->getTextLength();
198            case "willValidate":
199                return $this->getWillValidate();
200            case "validity":
201                return $this->getValidity();
202            case "validationMessage":
203                return $this->getValidationMessage();
204            case "labels":
205                return $this->getLabels();
206            case "selectionStart":
207                return $this->getSelectionStart();
208            case "selectionEnd":
209                return $this->getSelectionEnd();
210            case "selectionDirection":
211                return $this->getSelectionDirection();
212            default:
213                break;
214        }
215        '@phan-var \Wikimedia\IDLeDOM\Helper\HTMLTextAreaElement $this';
216        // @var \Wikimedia\IDLeDOM\Helper\HTMLTextAreaElement $this
217        return $this->_getMissingProp( $name );
218    }
219
220    /**
221     * @param string $name
222     * @return bool
223     */
224    public function __isset( string $name ): bool {
225        '@phan-var \Wikimedia\IDLeDOM\HTMLTextAreaElement $this';
226        // @var \Wikimedia\IDLeDOM\HTMLTextAreaElement $this
227        switch ( $name ) {
228            case "nodeType":
229                return true;
230            case "nodeName":
231                return true;
232            case "baseURI":
233                return true;
234            case "isConnected":
235                return true;
236            case "ownerDocument":
237                return $this->getOwnerDocument() !== null;
238            case "parentNode":
239                return $this->getParentNode() !== null;
240            case "parentElement":
241                return $this->getParentElement() !== null;
242            case "childNodes":
243                return true;
244            case "firstChild":
245                return $this->getFirstChild() !== null;
246            case "lastChild":
247                return $this->getLastChild() !== null;
248            case "previousSibling":
249                return $this->getPreviousSibling() !== null;
250            case "nextSibling":
251                return $this->getNextSibling() !== null;
252            case "nodeValue":
253                return $this->getNodeValue() !== null;
254            case "textContent":
255                return $this->getTextContent() !== null;
256            case "innerHTML":
257                return true;
258            case "previousElementSibling":
259                return $this->getPreviousElementSibling() !== null;
260            case "nextElementSibling":
261                return $this->getNextElementSibling() !== null;
262            case "children":
263                return true;
264            case "firstElementChild":
265                return $this->getFirstElementChild() !== null;
266            case "lastElementChild":
267                return $this->getLastElementChild() !== null;
268            case "childElementCount":
269                return true;
270            case "assignedSlot":
271                return $this->getAssignedSlot() !== null;
272            case "namespaceURI":
273                return $this->getNamespaceURI() !== null;
274            case "prefix":
275                return $this->getPrefix() !== null;
276            case "localName":
277                return true;
278            case "tagName":
279                return true;
280            case "id":
281                return true;
282            case "className":
283                return true;
284            case "classList":
285                return true;
286            case "slot":
287                return true;
288            case "attributes":
289                return true;
290            case "shadowRoot":
291                return $this->getShadowRoot() !== null;
292            case "outerHTML":
293                return true;
294            case "style":
295                return true;
296            case "contentEditable":
297                return true;
298            case "enterKeyHint":
299                return true;
300            case "isContentEditable":
301                return true;
302            case "inputMode":
303                return true;
304            case "onload":
305                return true;
306            case "dataset":
307                return true;
308            case "nonce":
309                return true;
310            case "tabIndex":
311                return true;
312            case "title":
313                return true;
314            case "lang":
315                return true;
316            case "translate":
317                return true;
318            case "dir":
319                return true;
320            case "hidden":
321                return true;
322            case "accessKey":
323                return true;
324            case "accessKeyLabel":
325                return true;
326            case "draggable":
327                return true;
328            case "spellcheck":
329                return true;
330            case "autocapitalize":
331                return true;
332            case "innerText":
333                return true;
334            case "offsetParent":
335                return $this->getOffsetParent() !== null;
336            case "offsetTop":
337                return true;
338            case "offsetLeft":
339                return true;
340            case "offsetWidth":
341                return true;
342            case "offsetHeight":
343                return true;
344            case "autocomplete":
345                return true;
346            case "autofocus":
347                return true;
348            case "cols":
349                return true;
350            case "dirName":
351                return true;
352            case "disabled":
353                return true;
354            case "form":
355                return $this->getForm() !== null;
356            case "maxLength":
357                return true;
358            case "minLength":
359                return true;
360            case "name":
361                return true;
362            case "placeholder":
363                return true;
364            case "readOnly":
365                return true;
366            case "required":
367                return true;
368            case "rows":
369                return true;
370            case "wrap":
371                return true;
372            case "type":
373                return true;
374            case "defaultValue":
375                return true;
376            case "value":
377                return true;
378            case "textLength":
379                return true;
380            case "willValidate":
381                return true;
382            case "validity":
383                return true;
384            case "validationMessage":
385                return true;
386            case "labels":
387                return true;
388            case "selectionStart":
389                return true;
390            case "selectionEnd":
391                return true;
392            case "selectionDirection":
393                return true;
394            default:
395                break;
396        }
397        return false;
398    }
399
400    /**
401     * @param string $name
402     * @param mixed $value
403     */
404    public function __set( string $name, $value ): void {
405        '@phan-var \Wikimedia\IDLeDOM\HTMLTextAreaElement $this';
406        // @var \Wikimedia\IDLeDOM\HTMLTextAreaElement $this
407        switch ( $name ) {
408            case "nodeValue":
409                $this->setNodeValue( $value );
410                return;
411            case "textContent":
412                $this->setTextContent( $value );
413                return;
414            case "innerHTML":
415                $this->setInnerHTML( $value );
416                return;
417            case "id":
418                $this->setId( $value );
419                return;
420            case "className":
421                $this->setClassName( $value );
422                return;
423            case "classList":
424                $this->setClassList( $value );
425                return;
426            case "slot":
427                $this->setSlot( $value );
428                return;
429            case "outerHTML":
430                $this->setOuterHTML( $value );
431                return;
432            case "style":
433                $this->setStyle( $value );
434                return;
435            case "contentEditable":
436                $this->setContentEditable( $value );
437                return;
438            case "enterKeyHint":
439                $this->setEnterKeyHint( $value );
440                return;
441            case "inputMode":
442                $this->setInputMode( $value );
443                return;
444            case "onload":
445                $this->setOnload( $value );
446                return;
447            case "nonce":
448                $this->setNonce( $value );
449                return;
450            case "tabIndex":
451                $this->setTabIndex( $value );
452                return;
453            case "title":
454                $this->setTitle( $value );
455                return;
456            case "lang":
457                $this->setLang( $value );
458                return;
459            case "translate":
460                $this->setTranslate( $value );
461                return;
462            case "dir":
463                $this->setDir( $value );
464                return;
465            case "hidden":
466                $this->setHidden( $value );
467                return;
468            case "accessKey":
469                $this->setAccessKey( $value );
470                return;
471            case "draggable":
472                $this->setDraggable( $value );
473                return;
474            case "spellcheck":
475                $this->setSpellcheck( $value );
476                return;
477            case "autocapitalize":
478                $this->setAutocapitalize( $value );
479                return;
480            case "innerText":
481                $this->setInnerText( $value );
482                return;
483            case "autocomplete":
484                $this->setAutocomplete( $value );
485                return;
486            case "autofocus":
487                $this->setAutofocus( $value );
488                return;
489            case "cols":
490                $this->setCols( $value );
491                return;
492            case "dirName":
493                $this->setDirName( $value );
494                return;
495            case "disabled":
496                $this->setDisabled( $value );
497                return;
498            case "maxLength":
499                $this->setMaxLength( $value );
500                return;
501            case "minLength":
502                $this->setMinLength( $value );
503                return;
504            case "name":
505                $this->setName( $value );
506                return;
507            case "placeholder":
508                $this->setPlaceholder( $value );
509                return;
510            case "readOnly":
511                $this->setReadOnly( $value );
512                return;
513            case "required":
514                $this->setRequired( $value );
515                return;
516            case "rows":
517                $this->setRows( $value );
518                return;
519            case "wrap":
520                $this->setWrap( $value );
521                return;
522            case "defaultValue":
523                $this->setDefaultValue( $value );
524                return;
525            case "value":
526                $this->setValue( $value );
527                return;
528            case "selectionStart":
529                $this->setSelectionStart( $value );
530                return;
531            case "selectionEnd":
532                $this->setSelectionEnd( $value );
533                return;
534            case "selectionDirection":
535                $this->setSelectionDirection( $value );
536                return;
537            default:
538                break;
539        }
540        '@phan-var \Wikimedia\IDLeDOM\Helper\HTMLTextAreaElement $this';
541        // @var \Wikimedia\IDLeDOM\Helper\HTMLTextAreaElement $this
542        $this->_setMissingProp( $name, $value );
543    }
544
545    /**
546     * @param string $name
547     */
548    public function __unset( string $name ): void {
549        '@phan-var \Wikimedia\IDLeDOM\HTMLTextAreaElement $this';
550        // @var \Wikimedia\IDLeDOM\HTMLTextAreaElement $this
551        switch ( $name ) {
552            case "nodeType":
553                break;
554            case "nodeName":
555                break;
556            case "baseURI":
557                break;
558            case "isConnected":
559                break;
560            case "ownerDocument":
561                break;
562            case "parentNode":
563                break;
564            case "parentElement":
565                break;
566            case "childNodes":
567                break;
568            case "firstChild":
569                break;
570            case "lastChild":
571                break;
572            case "previousSibling":
573                break;
574            case "nextSibling":
575                break;
576            case "nodeValue":
577                $this->setNodeValue( null );
578                return;
579            case "textContent":
580                $this->setTextContent( null );
581                return;
582            case "innerHTML":
583                break;
584            case "previousElementSibling":
585                break;
586            case "nextElementSibling":
587                break;
588            case "children":
589                break;
590            case "firstElementChild":
591                break;
592            case "lastElementChild":
593                break;
594            case "childElementCount":
595                break;
596            case "assignedSlot":
597                break;
598            case "namespaceURI":
599                break;
600            case "prefix":
601                break;
602            case "localName":
603                break;
604            case "tagName":
605                break;
606            case "id":
607                break;
608            case "className":
609                break;
610            case "classList":
611                break;
612            case "slot":
613                break;
614            case "attributes":
615                break;
616            case "shadowRoot":
617                break;
618            case "outerHTML":
619                break;
620            case "style":
621                break;
622            case "contentEditable":
623                break;
624            case "enterKeyHint":
625                break;
626            case "isContentEditable":
627                break;
628            case "inputMode":
629                break;
630            case "onload":
631                break;
632            case "dataset":
633                break;
634            case "nonce":
635                break;
636            case "tabIndex":
637                break;
638            case "title":
639                break;
640            case "lang":
641                break;
642            case "translate":
643                break;
644            case "dir":
645                break;
646            case "hidden":
647                break;
648            case "accessKey":
649                break;
650            case "accessKeyLabel":
651                break;
652            case "draggable":
653                break;
654            case "spellcheck":
655                break;
656            case "autocapitalize":
657                break;
658            case "innerText":
659                break;
660            case "offsetParent":
661                break;
662            case "offsetTop":
663                break;
664            case "offsetLeft":
665                break;
666            case "offsetWidth":
667                break;
668            case "offsetHeight":
669                break;
670            case "autocomplete":
671                break;
672            case "autofocus":
673                break;
674            case "cols":
675                break;
676            case "dirName":
677                break;
678            case "disabled":
679                break;
680            case "form":
681                break;
682            case "maxLength":
683                break;
684            case "minLength":
685                break;
686            case "name":
687                break;
688            case "placeholder":
689                break;
690            case "readOnly":
691                break;
692            case "required":
693                break;
694            case "rows":
695                break;
696            case "wrap":
697                break;
698            case "type":
699                break;
700            case "defaultValue":
701                break;
702            case "value":
703                break;
704            case "textLength":
705                break;
706            case "willValidate":
707                break;
708            case "validity":
709                break;
710            case "validationMessage":
711                break;
712            case "labels":
713                break;
714            case "selectionStart":
715                break;
716            case "selectionEnd":
717                break;
718            case "selectionDirection":
719                break;
720            default:
721                return;
722        }
723        $trace = debug_backtrace();
724        while (
725            count( $trace ) > 0 &&
726            $trace[0]['function'] !== "__unset"
727        ) {
728            array_shift( $trace );
729        }
730        trigger_error(
731            'Undefined property' .
732            ' via ' . ( $trace[0]['function'] ?? '' ) . '(): ' . $name .
733            ' in ' . ( $trace[0]['file'] ?? '' ) .
734            ' on line ' . ( $trace[0]['line'] ?? '' ),
735            E_USER_NOTICE
736        );
737    }
738
739    /**
740     * @return string
741     */
742    public function getAutocomplete(): string {
743        '@phan-var \Wikimedia\IDLeDOM\Element $this';
744        // @var \Wikimedia\IDLeDOM\Element $this
745        $val = $this->getAttribute( 'autocomplete' );
746        if ( $val !== null ) {
747            $val = strtr( $val, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz' );
748            switch ( $val ) {
749                case 'on':
750                case 'off':
751                    return $val;
752                default:
753                    return 'on';
754            }
755        }
756        return 'on';
757    }
758
759    /**
760     * @param string $val
761     */
762    public function setAutocomplete( string $val ): void {
763        '@phan-var \Wikimedia\IDLeDOM\Element $this';
764        // @var \Wikimedia\IDLeDOM\Element $this
765        $this->setAttribute( 'autocomplete', $val );
766    }
767
768    /**
769     * @return bool
770     */
771    public function getAutofocus(): bool {
772        '@phan-var \Wikimedia\IDLeDOM\Element $this';
773        // @var \Wikimedia\IDLeDOM\Element $this
774        return $this->hasAttribute( 'autofocus' );
775    }
776
777    /**
778     * @param bool $val
779     */
780    public function setAutofocus( bool $val ): void {
781        '@phan-var \Wikimedia\IDLeDOM\Element $this';
782        // @var \Wikimedia\IDLeDOM\Element $this
783        if ( $val ) {
784            $this->setAttribute( 'autofocus', '' );
785        } else {
786            $this->removeAttribute( 'autofocus' );
787        }
788    }
789
790    /**
791     * @return string
792     */
793    public function getDirName(): string {
794        '@phan-var \Wikimedia\IDLeDOM\Element $this';
795        // @var \Wikimedia\IDLeDOM\Element $this
796        return $this->getAttribute( 'dirname' ) ?? '';
797    }
798
799    /**
800     * @param string $val
801     */
802    public function setDirName( string $val ): void {
803        '@phan-var \Wikimedia\IDLeDOM\Element $this';
804        // @var \Wikimedia\IDLeDOM\Element $this
805        $this->setAttribute( 'dirname', $val );
806    }
807
808    /**
809     * @return bool
810     */
811    public function getDisabled(): bool {
812        '@phan-var \Wikimedia\IDLeDOM\Element $this';
813        // @var \Wikimedia\IDLeDOM\Element $this
814        return $this->hasAttribute( 'disabled' );
815    }
816
817    /**
818     * @param bool $val
819     */
820    public function setDisabled( bool $val ): void {
821        '@phan-var \Wikimedia\IDLeDOM\Element $this';
822        // @var \Wikimedia\IDLeDOM\Element $this
823        if ( $val ) {
824            $this->setAttribute( 'disabled', '' );
825        } else {
826            $this->removeAttribute( 'disabled' );
827        }
828    }
829
830    /**
831     * @return string
832     */
833    public function getName(): string {
834        '@phan-var \Wikimedia\IDLeDOM\Element $this';
835        // @var \Wikimedia\IDLeDOM\Element $this
836        return $this->getAttribute( 'name' ) ?? '';
837    }
838
839    /**
840     * @param string $val
841     */
842    public function setName( string $val ): void {
843        '@phan-var \Wikimedia\IDLeDOM\Element $this';
844        // @var \Wikimedia\IDLeDOM\Element $this
845        $this->setAttribute( 'name', $val );
846    }
847
848    /**
849     * @return string
850     */
851    public function getPlaceholder(): string {
852        '@phan-var \Wikimedia\IDLeDOM\Element $this';
853        // @var \Wikimedia\IDLeDOM\Element $this
854        return $this->getAttribute( 'placeholder' ) ?? '';
855    }
856
857    /**
858     * @param string $val
859     */
860    public function setPlaceholder( string $val ): void {
861        '@phan-var \Wikimedia\IDLeDOM\Element $this';
862        // @var \Wikimedia\IDLeDOM\Element $this
863        $this->setAttribute( 'placeholder', $val );
864    }
865
866    /**
867     * @return bool
868     */
869    public function getReadOnly(): bool {
870        '@phan-var \Wikimedia\IDLeDOM\Element $this';
871        // @var \Wikimedia\IDLeDOM\Element $this
872        return $this->hasAttribute( 'readonly' );
873    }
874
875    /**
876     * @param bool $val
877     */
878    public function setReadOnly( bool $val ): void {
879        '@phan-var \Wikimedia\IDLeDOM\Element $this';
880        // @var \Wikimedia\IDLeDOM\Element $this
881        if ( $val ) {
882            $this->setAttribute( 'readonly', '' );
883        } else {
884            $this->removeAttribute( 'readonly' );
885        }
886    }
887
888    /**
889     * @return bool
890     */
891    public function getRequired(): bool {
892        '@phan-var \Wikimedia\IDLeDOM\Element $this';
893        // @var \Wikimedia\IDLeDOM\Element $this
894        return $this->hasAttribute( 'required' );
895    }
896
897    /**
898     * @param bool $val
899     */
900    public function setRequired( bool $val ): void {
901        '@phan-var \Wikimedia\IDLeDOM\Element $this';
902        // @var \Wikimedia\IDLeDOM\Element $this
903        if ( $val ) {
904            $this->setAttribute( 'required', '' );
905        } else {
906            $this->removeAttribute( 'required' );
907        }
908    }
909
910    /**
911     * @return string
912     */
913    public function getWrap(): string {
914        '@phan-var \Wikimedia\IDLeDOM\Element $this';
915        // @var \Wikimedia\IDLeDOM\Element $this
916        return $this->getAttribute( 'wrap' ) ?? '';
917    }
918
919    /**
920     * @param string $val
921     */
922    public function setWrap( string $val ): void {
923        '@phan-var \Wikimedia\IDLeDOM\Element $this';
924        // @var \Wikimedia\IDLeDOM\Element $this
925        $this->setAttribute( 'wrap', $val );
926    }
927
928}