From bfe8bf523cd703fc6fdfb22f6099bf47727e464e Mon Sep 17 00:00:00 2001 From: Matt Brown Date: Mon, 15 Feb 2021 11:13:50 -0500 Subject: [PATCH] Add slash --- src/Psalm/Internal/PhpVisitor/PartialParserVisitor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { /**