driade / phpfmt8

PHP formatter for Sublime Text 4, with PHP 8 support.
BSD 3-Clause "New" or "Revised" License
46 stars 2 forks source link

Problems with spaces when formatting #68

Closed reprintsev closed 6 months ago

reprintsev commented 6 months ago

When using the --exclude=AddMissingCurlyBraces option, the space between the closing parenthesis and next statement is removed

<?php
if (true) return;

becomes

<?php
if (true)return;

When using the --exclude=MergeParenCloseWithCurlyOpen option, an extra space is added before else

<?php
if (true) {
    // something
}
else {
    // something
}

becomes

<?php
if (true) {
    // something
}
 else {
    // something
}
driade commented 6 months ago

Thanks, I'll check it

driade commented 6 months ago

Thank you @reprintsev this should be already fixed in the latest release. May you please confirm?

reprintsev commented 6 months ago

@driade yes, the problem is solved, thanks!