Skip to content

Commit

Permalink
Skip enum definitions in checkSectionErrors()
Browse files Browse the repository at this point in the history
They don't follow the normal rules.
  • Loading branch information
nielsdos committed Dec 2, 2024
1 parent aa6b0bf commit a4cb1b5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/qa/section-order.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
'reference/dom/domdocument/replacechildren.xml',
'reference/dom/domdocument/append.xml',
'reference/dom/domnodelist/getiterator.xml',
'reference/dom/dom/getiterator.xml',
];

const VALID_SECTION_ROLES = [
Expand Down Expand Up @@ -178,8 +179,8 @@ function checkSectionErrors(string $path): array
$pageHasNoReturnSection = false;
$content = file_get_contents($path);

/* Skip class definitions */
if (preg_match('#<reference xml:id="(.+)" role="class"#', $content)) {
/* Skip class or enum definitions */
if (preg_match('#<reference xml:id="(.+)" role="(class|enum)"#', $content)) {
return [];
}
/* Skip Exception classes definitions */
Expand Down

0 comments on commit a4cb1b5

Please sign in to comment.