8000 Replace ...] with null] (#36) · symfony-tools/code-block-checker@bfb8e45 · GitHub
[go: up one dir, main page]

Skip to content

Commit bfb8e45

Browse files
authored
Replace ...] with null] (#36)
1 parent e44f747 commit bfb8e45

File tree

Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ private function getContents(CodeNode $node, string $language): string
4747
}
4848

4949
// Allow us to use "..." as a placeholder
50-
$contents = str_replace(['...,', '...)', '...;'], ['null,', 'null)', 'null;'], $contents);
50+
$contents = str_replace(['...,', '...)', '...;', '...]'], ['null,', 'null)', 'null;', 'null]'], $contents);
5151

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