Update .php handling to keep <?php at the top
Looking at https://www.php.net/manual/en/language.basic-syntax.phptags.php there are just too many variations and I'm not convinced the added complexity to support all of them would be worth it here. Thus, support only the case where closing tag "?>" is either omitted or on a separate line. A workaround for all other cases is to add the license header manually. Can always revisit this later.
This commit is contained in:
4
testdata/initial/file.php
vendored
4
testdata/initial/file.php
vendored
@@ -1 +1,3 @@
|
||||
<?php phpinfo(); ?>
|
||||
<?php
|
||||
namespace App;
|
||||
phpinfo();
|
||||
|
||||
Reference in New Issue
Block a user