Skip to content

Commit 0e47b54

Browse files
committed
Fix PHP tag generation in OutputFormatter
1 parent 49b7420 commit 0e47b54

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/OutputFormatter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
public function format(string $content, string $existingContent): string
2525
{
2626
preg_match('/^<\?php\s*\/\*[\s\S]*?\*\//', $existingContent, $matches);
27-
$existingHeader = $matches[0] ?? '';
27+
$existingHeader = $matches[0] ?? '<?php';
2828

2929
$replacements = [
3030
'/\n\n\t(public|private|\/\*\*)/m' => PHP_EOL . ' $1',

0 commit comments

Comments
 (0)