-
Notifications
You must be signed in to change notification settings - Fork 29
Description
Description
The formatter automatically inserts a semicolon inside a string interpolation block. For example, a line like:
Error moving file '{$file_name}' to folder: {$e->getMessage()}
is transformed into:
Error moving file '{$file_name}' to folder: {$e->getMessage();}
Interestingly, this seems to manifest inconsistently depending on whether there are multiple such lines in the same file. If at least one line in the file already contains a semicolon when saving, the formatter seems to leave the others untouched. However, if all lines of this pattern (string interpolation with curly braces) lack the semicolon upon saving, the formatter then incorrectly adds the semicolon to all of them.
Expected Behavior
No semicolon should be added inside the braces, preserving the original (and valid) syntax:
echo "Error moving file '{$file_name}' to folder: {$e->getMessage()}";
Thank you for looking into this!