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