Skip to content

Commit

Permalink
setting document element metadata for NoHeadings rule
Browse files Browse the repository at this point in the history
  • Loading branch information
Ethan Finlay authored and Ethan Finlay committed Jan 17, 2023
1 parent 9229986 commit 45e1b10
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Rule/NoHeadings.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@ public function check()
&& !$this->getAllElements('h4')
&& !$this->getAllElements('h5')
&& !$this->getAllElements('h6')) {
$this->setIssue($this->dom->documentElement);
/*
Since this rule sets the document element as the issue
we set this flag here so we can process it accordingly in UDOIT.
*/
$metadata = array('isDocumentElement' => true);
$this->setIssue($this->dom->documentElement, null, json_encode($metadata));
}
}
$this->totalTests++;
Expand Down

0 comments on commit 45e1b10

Please sign in to comment.