File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3538,7 +3538,7 @@ public function format($source) {
35383538 }
35393539
35403540 final class LeftAlignComment extends FormatterPass {
3541- const NON_INDENTABLE_COMMENT = "/* \x2 COMMENT \x3 */ " ;
3541+ const NON_INDENTABLE_COMMENT = "/*__PHPFMT_NON_INDENTABLE_COMMENT__ */ " ;
35423542
35433543 public function candidate ($ source , $ foundTokens ) {
35443544 if (
@@ -3821,6 +3821,9 @@ public function format($source) {
38213821 case T_START_HEREDOC :
38223822 $ this ->appendCode ($ text );
38233823 $ this ->printUntil (T_END_HEREDOC );
3824+ if ($ this ->rightUsefulTokenIs (ST_SEMI_COLON )) {
3825+ $ this ->printUntil (ST_SEMI_COLON );
3826+ }
38243827 break ;
38253828
38263829 case T_COMMENT :
@@ -4969,11 +4972,10 @@ public function format($source) {
49694972 break ;
49704973 case T_START_HEREDOC :
49714974 $ this ->appendCode ($ text );
4972- if (count ($ attributeStack )) {
4973- $ this ->printUntil (T_END_HEREDOC );
4974- } else {
4975- $ this ->printUntil (T_END_HEREDOC );
4976- }
4975+ $ this ->printUntil (T_END_HEREDOC );
4976+ if ($ this ->rightUsefulTokenIs (ST_SEMI_COLON )) {
4977+ $ this ->printUntil (ST_SEMI_COLON );
4978+ }
49774979 break ;
49784980
49794981 case T_CALLABLE :
Original file line number Diff line number Diff line change 11<?php
22//passes:AutoSemicolon
3+ //version:7.3
34// Have a free MRE for both options. Run the formatter over this and both will break.
45print_r(<<<SQL
56 SELECT *
Original file line number Diff line number Diff line change 11<?php
22//passes:AutoSemicolon
3+ //version:7.3
34// Have a free MRE for both options. Run the formatter over this and both will break.
45print_r(<<<SQL
56 SELECT *
You can’t perform that action at this time.
0 commit comments