Skip to content

Commit 5bb2eec

Browse files
committed
Emit asymmetric visibility modifiers in field synopsis.
Emit public(set) / protected(set) / private(set) modifiers in the generated <fieldsynopsis> so the manual reflects set visibility for asymmetrically visible properties.
1 parent c8155e9 commit 5bb2eec

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

build/gen_stub.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2460,6 +2460,17 @@ protected function addModifiersToFieldSynopsis(DOMDocument $doc, DOMElement $fie
24602460
$fieldsynopsisElement->appendChild(new DOMText("\n$indentation"));
24612461
$fieldsynopsisElement->appendChild($doc->createElement("modifier", "private"));
24622462
}
2463+
2464+
if ($this->flags & Modifiers::PUBLIC_SET) {
2465+
$fieldsynopsisElement->appendChild(new DOMText("\n$indentation"));
2466+
$fieldsynopsisElement->appendChild($doc->createElement("modifier", "public(set)"));
2467+
} elseif ($this->flags & Modifiers::PROTECTED_SET) {
2468+
$fieldsynopsisElement->appendChild(new DOMText("\n$indentation"));
2469+
$fieldsynopsisElement->appendChild($doc->createElement("modifier", "protected(set)"));
2470+
} elseif ($this->flags & Modifiers::PRIVATE_SET) {
2471+
$fieldsynopsisElement->appendChild(new DOMText("\n$indentation"));
2472+
$fieldsynopsisElement->appendChild($doc->createElement("modifier", "private(set)"));
2473+
}
24632474
}
24642475

24652476
}

0 commit comments

Comments
 (0)