Skip to content

Commit eb1e22b

Browse files
committed
Fix constant references inside parameter default values when generating the manual
1 parent a5c7903 commit eb1e22b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

build/gen_stub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2184,7 +2184,7 @@ public function getMethodSynopsisElement(DOMDocument $doc): ?DOMElement {
21842184
$defaultValue = $arg->getDefaultValueAsMethodSynopsisString();
21852185
if ($defaultValue !== null) {
21862186
$initializer = $doc->createElement('initializer');
2187-
if (preg_match('/^[a-zA-Z_][a-zA-Z_0-9]*$/', $defaultValue)) {
2187+
if (preg_match('/^[a-zA-Z_][a-zA-Z_0-9\:\\\\]*$/', $defaultValue)) {
21882188
$constant = $doc->createElement('constant', $defaultValue);
21892189
$initializer->appendChild($constant);
21902190
} else {

0 commit comments

Comments
 (0)