diff --git a/build/gen_stub.php b/build/gen_stub.php index c32f53678d1e2..1468a0b68b164 100755 --- a/build/gen_stub.php +++ b/build/gen_stub.php @@ -2086,6 +2086,13 @@ public function getMethodSynopsisElement(array $funcMap, array $aliasMap, DOMDoc $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 @@ private static function createOoElement( $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 "));