crazyfactory/php-sniffs

Should we fix tab-indented multi-line strings?

Opened this issue · 3 comments

$txt = 'text
           text2
           text3
';

If there are tab indents in front of "text2" and "text3", the sniff does not convert them to spaces.

That's intentional. I'm not sure if we should auto-fix this.

It's a temporary inconvenience when converting the old files.

Why don't we convert tab to space for multi line string ? For what reason.

We should do that project-wide once. Afterwards it shouldn't appear again anyway.

Currently i can't think of a scenarios in which we'd want the tabs. So yes we could do an automatic fix for this.