joomla/coding-standards

do-while throwing an error

eddieajau opened this issue · 2 comments

Or a warning - can't recall, but the code standards complain about a structure like this:

do
}
    // something
}
while ($condition);

From memory it says there should be a new line before the while.

It's because of ControlStructureSpacingSniff. I commented the T_DO piece out at line 56 to get around it elsewhere, but that surely isn't right. I want to say if we add T_DO to the conditional here then we should be good to go.

I believe this can be closed with the merge from #127