mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-22 02:36:52 +01:00
Merge pull request #3395 from shaal/do-not-remove-empty-php-code
This commit is contained in:
commit
9d2a0c1245
@ -82,13 +82,8 @@ final class BetterStandardPrinter extends Standard
|
||||
// php attributes
|
||||
$content = $this->contentPhpAttributePlaceholderReplacer->decorateContent($content);
|
||||
|
||||
// remove dead <?php structures
|
||||
$clearContent = Strings::replace($content, '#\<\?php(\s)\?\>\n?#');
|
||||
|
||||
$clearContent = Strings::replace($clearContent, '#\<\?php(\s+)\?\>#');
|
||||
|
||||
// keep EOL
|
||||
return rtrim($clearContent) . $this->nl;
|
||||
return rtrim($content) . $this->nl;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user