Remove extra/trailing blank lines/spaces
Indent `when` as deep as `case`
Add missing space between `{` and `|`
Add missing space after `,`
Add missing spaces surrounding default value assignment
Use `def` with parentheses when there are arguments
Merge pull request #2783 from toch/fix-style-issues

Fix style issues