Skip to content

Commit 2f591b4

Browse files
committed
fix replacing ellipsis
1 parent 2c7e9c9 commit 2f591b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Service/CodeValidator/PhpValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ private function getContents(CodeNode $node, &$linesPrepended = null): string
5151
}
5252

5353
// Allow us to use "..." as a placeholder
54-
$contents = str_replace(['...,', '...)', '...;', '...]'], ['null,', 'null)', 'null;', 'null]'], $contents);
54+
$contents = str_replace(['...,', '...)', '...;', '...]', '... }'], ['null,', 'null)', 'null;', 'null]', '$a = null; }'], $contents);
5555

5656
$lines = explode("\n", $contents);
5757
if (!str_contains($lines[0] ?? '', '<?php') && !str_contains($lines[1] ?? '', '<?php') && !str_contains($lines[2] ?? '', '<?php')) {

0 commit comments

Comments
 (0)