make the bake templates pass phpcs
if it's indented, don't leave trailing space
phpcs fixes to test templates

And related code changes to make bake match the bake_compare files
function whitespace
Merge pull request #5258 from AD7six/3.0-bake-test-fixes

3.0 bake test fixes