mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
Add support for non-parameter attribute rendering in stubs (#16926)
This commit is contained in:
parent
90b66edbca
commit
02c2cfaaf3
1 changed files with 14 additions and 0 deletions
|
@ -2086,6 +2086,13 @@ OUPUT_EXAMPLE
|
|||
|
||||
$methodSynopsis->appendChild(new DOMText("\n "));
|
||||
|
||||
foreach ($this->attributes as $attribute) {
|
||||
$modifier = $doc->createElement("modifier", "#[\\" . $attribute->class . "]");
|
||||
$modifier->setAttribute("role", "attribute");
|
||||
$methodSynopsis->appendChild($modifier);
|
||||
$methodSynopsis->appendChild(new DOMText("\n "));
|
||||
}
|
||||
|
||||
foreach ($this->getModifierNames() as $modifierString) {
|
||||
$modifierElement = $doc->createElement('modifier', $modifierString);
|
||||
$methodSynopsis->appendChild($modifierElement);
|
||||
|
@ -3870,6 +3877,13 @@ class ClassInfo {
|
|||
$ooElement->appendChild($doc->createElement('modifier', $modifierOverride));
|
||||
$ooElement->appendChild(new DOMText("\n$indentation "));
|
||||
} elseif ($withModifiers) {
|
||||
foreach ($classInfo->attributes as $attribute) {
|
||||
$modifier = $doc->createElement("modifier", "#[\\" . $attribute->class . "]");
|
||||
$modifier->setAttribute("role", "attribute");
|
||||
$ooElement->appendChild($modifier);
|
||||
$ooElement->appendChild(new DOMText("\n$indentation "));
|
||||
}
|
||||
|
||||
if ($classInfo->flags & Modifiers::FINAL) {
|
||||
$ooElement->appendChild($doc->createElement('modifier', 'final'));
|
||||
$ooElement->appendChild(new DOMText("\n$indentation "));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue