At least your changes follow that style. What is more strange IMO is that there is space after the foreach and after the switch keyword.

Anyway, the style is inconsistent