Skip to content

Commit 32102ca

Browse files
committed
Added a temporary workaround for an issue with class constant resolving
in the pdepend staticReflection package.
1 parent d601eb2 commit 32102ca

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/classbuilder.php

+6
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,12 @@ protected function processParameters(fDOMElement $ctx, Array $parameters, fDOMEl
211211

212212
protected function processValue(fDOMElement $ctx, $src) {
213213
$value = is_null($src) ? 'null' : var_export($src, true);
214+
215+
// Temporary workaround due to an issue in pdepend staticReflection package.
216+
if (strpos($value, '\'__StaticReflectionConstantValue(') !== false) {
217+
$value = preg_replace("#'__StaticReflectionConstantValue\((.*)\)'#", '$1', $value);
218+
}
219+
214220
$default = $ctx->appendElementNS('http://xml.phpdox.de/src#', 'default');
215221
$default->appendChild($ctx->ownerDocument->createTextnode($value));
216222
}

0 commit comments

Comments
 (0)