phpcs fixes

and correct one test in the fragile situation of using a heredoc with
trailing whitespace