Skip to content

Commit 0fc60fa

Browse files
committed
Always include the constructor on the class manual pages
1 parent b4df038 commit 0fc60fa

File tree

1 file changed

+26
-30
lines changed

1 file changed

+26
-30
lines changed

build/gen_stub.php

+26-30
Original file line numberDiff line numberDiff line change
@@ -2760,40 +2760,36 @@ public function getClassSynopsisElement(DOMDocument $doc, array $classMap, itera
27602760
"&InheritedProperties;"
27612761
);
27622762

2763-
if (!empty($this->funcInfos)) {
2764-
$classSynopsis->appendChild(new DOMText("\n\n "));
2765-
$classSynopsisInfo = $doc->createElement("classsynopsisinfo", "&Methods;");
2766-
$classSynopsisInfo->setAttribute("role", "comment");
2767-
$classSynopsis->appendChild($classSynopsisInfo);
2763+
$classSynopsis->appendChild(new DOMText("\n\n "));
2764+
$classSynopsisInfo = $doc->createElement("classsynopsisinfo", "&Methods;");
2765+
$classSynopsisInfo->setAttribute("role", "comment");
2766+
$classSynopsis->appendChild($classSynopsisInfo);
27682767

2769-
$classReference = self::getClassSynopsisReference($this->name);
2768+
$classReference = self::getClassSynopsisReference($this->name);
27702769

2771-
if ($this->hasConstructor()) {
2772-
$classSynopsis->appendChild(new DOMText("\n "));
2773-
$includeElement = $this->createIncludeElement(
2774-
$doc,
2775-
"xmlns(db=http://docbook.org/ns/docbook) xpointer(id('$classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis[not(@role='procedural')])"
2776-
);
2777-
$classSynopsis->appendChild($includeElement);
2778-
}
2770+
$classSynopsis->appendChild(new DOMText("\n "));
2771+
$includeElement = $this->createIncludeElement(
2772+
$doc,
2773+
"xmlns(db=http://docbook.org/ns/docbook) xpointer(id('$classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis[not(@role='procedural')])"
2774+
);
2775+
$classSynopsis->appendChild($includeElement);
27792776

2780-
if ($this->hasMethods()) {
2781-
$classSynopsis->appendChild(new DOMText("\n "));
2782-
$includeElement = $this->createIncludeElement(
2783-
$doc,
2784-
"xmlns(db=http://docbook.org/ns/docbook) xpointer(id('$classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[not(@role='procedural')])"
2785-
);
2786-
$classSynopsis->appendChild($includeElement);
2787-
}
2777+
if ($this->hasMethods()) {
2778+
$classSynopsis->appendChild(new DOMText("\n "));
2779+
$includeElement = $this->createIncludeElement(
2780+
$doc,
2781+
"xmlns(db=http://docbook.org/ns/docbook) xpointer(id('$classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[not(@role='procedural')])"
2782+
);
2783+
$classSynopsis->appendChild($includeElement);
2784+
}
27882785

2789-
if ($this->hasDestructor()) {
2790-
$classSynopsis->appendChild(new DOMText("\n "));
2791-
$includeElement = $this->createIncludeElement(
2792-
$doc,
2793-
"xmlns(db=http://docbook.org/ns/docbook) xpointer(id('$classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:destructorsynopsis[not(@role='procedural')])"
2794-
);
2795-
$classSynopsis->appendChild($includeElement);
2796-
}
2786+
if ($this->hasDestructor()) {
2787+
$classSynopsis->appendChild(new DOMText("\n "));
2788+
$includeElement = $this->createIncludeElement(
2789+
$doc,
2790+
"xmlns(db=http://docbook.org/ns/docbook) xpointer(id('$classReference')/db:refentry/db:refsect1[@role='description']/descendant::db:destructorsynopsis[not(@role='procedural')])"
2791+
);
2792+
$classSynopsis->appendChild($includeElement);
27972793
}
27982794

27992795
if (!empty($parentsWithInheritedMethods)) {

0 commit comments

Comments
 (0)