Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 7 additions & 17 deletions build/gen_stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -3981,8 +3981,7 @@ public function getClassSynopsisElement(DOMDocument $doc, array $classMap, array
$classSynopsis->appendChild(new DOMText("\n$classSynopsisIndentation "));
$includeElement = $this->createIncludeElement(
$doc,
"xmlns(db=http://docbook.org/ns/docbook) xpointer(id('$classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis[@role='$escapedName'])",
$classSynopsisIndentationLevel + 1
"xmlns(db=http://docbook.org/ns/docbook) xpointer(id('$classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis[@role='$escapedName'])"
);
$classSynopsis->appendChild($includeElement);
}
Expand All @@ -3991,8 +3990,7 @@ public function getClassSynopsisElement(DOMDocument $doc, array $classMap, array
$classSynopsis->appendChild(new DOMText("\n$classSynopsisIndentation "));
$includeElement = $this->createIncludeElement(
$doc,
"xmlns(db=http://docbook.org/ns/docbook) xpointer(id('$classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[@role='$escapedName'])",
$classSynopsisIndentationLevel + 1
"xmlns(db=http://docbook.org/ns/docbook) xpointer(id('$classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[@role='$escapedName'])"
);
$classSynopsis->appendChild($includeElement);
}
Expand All @@ -4001,8 +3999,7 @@ public function getClassSynopsisElement(DOMDocument $doc, array $classMap, array
$classSynopsis->appendChild(new DOMText("\n$classSynopsisIndentation "));
$includeElement = $this->createIncludeElement(
$doc,
"xmlns(db=http://docbook.org/ns/docbook) xpointer(id('$classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:destructorsynopsis[@role='$escapedName'])",
$classSynopsisIndentationLevel + 1
"xmlns(db=http://docbook.org/ns/docbook) xpointer(id('$classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:destructorsynopsis[@role='$escapedName'])"
);
$classSynopsis->appendChild($includeElement);
}
Expand All @@ -4025,8 +4022,7 @@ public function getClassSynopsisElement(DOMDocument $doc, array $classMap, array
$classSynopsis->appendChild(new DOMText("\n$classSynopsisIndentation "));
$includeElement = $this->createIncludeElement(
$doc,
"xmlns(db=http://docbook.org/ns/docbook) xpointer(id('$parentReference')/db:refentry/db:refsect1[@role='description']/descendant::db:{$parentMethodsynopsisType}[@role='$escapedParentName'])",
$classSynopsisIndentationLevel + 1
"xmlns(db=http://docbook.org/ns/docbook) xpointer(id('$parentReference')/db:refentry/db:refsect1[@role='description']/descendant::db:{$parentMethodsynopsisType}[@role='$escapedParentName'])"
);

$classSynopsis->appendChild($includeElement);
Expand Down Expand Up @@ -4252,18 +4248,12 @@ public function getClassName(): string {
return $this->name->getLast();
}

private function createIncludeElement(DOMDocument $doc, string $query, int $indentationLevel): DOMElement
private function createIncludeElement(DOMDocument $doc, string $query): DOMElement
{
$indentation = str_repeat(" ", $indentationLevel);

$includeElement = $doc->createElement("xi:include");
$attr = $doc->createAttribute("xpointer");
$attr->value = $query;
$includeElement->appendChild($attr);
$fallbackElement = $doc->createElement("xi:fallback");
$includeElement->appendChild(new DOMText("\n$indentation "));
$includeElement->appendChild($fallbackElement);
$includeElement->appendChild(new DOMText("\n$indentation"));

return $includeElement;
}
Expand Down Expand Up @@ -4294,11 +4284,11 @@ private function appendInheritedMemberSectionToClassSynopsis(DOMDocument $doc, D
foreach ($parents as $parent) {
$classSynopsis->appendChild(new DOMText("\n$indentation"));
$parentReference = self::getClassSynopsisReference($parent);
$parentSynopsis = str_contains($parent->toString(), "\\") ? "db:packagesynopsis/db:classsynopsis" : "db:classsynopsis";

$includeElement = $this->createIncludeElement(
$doc,
"xmlns(db=http://docbook.org/ns/docbook) xpointer(id('$parentReference')/db:partintro/db:section/db:classsynopsis/db:fieldsynopsis[preceding-sibling::db:classsynopsisinfo[1][@role='comment' and text()='$label']]))",
$indentationLevel
"xmlns(db=http://docbook.org/ns/docbook) xpointer(id('$parentReference')/db:partintro/db:section/$parentSynopsis/db:fieldsynopsis[preceding-sibling::db:classsynopsisinfo[1][@role='comment' and text()='$label']]))"
);
$classSynopsis->appendChild($includeElement);
}
Expand Down
Loading