diff --git a/src/Psalm/Internal/PhpVisitor/PartialParserVisitor.php b/src/Psalm/Internal/PhpVisitor/PartialParserVisitor.php index 4577041f24a..e1f5e3ad328 100644 --- a/src/Psalm/Internal/PhpVisitor/PartialParserVisitor.php +++ b/src/Psalm/Internal/PhpVisitor/PartialParserVisitor.php @@ -196,7 +196,7 @@ public function enterNode(PhpParser\Node $node, &$traverseChildren = true) // Because we insert the extra colon we have to keep track of the places // we inserted it, and then shift the file offsets accordingly after // parsing has been done - $hacky_class_fix = preg_replace_callback( + $hacky_class_fix = \preg_replace_callback( '/(->|::)(\n\s*if\s*\()/', function (array $match) use (&$extra_characters) { /**