Remove PHP closing tags #979

PHP closing tags was still created in various places.
Merge pull request #1276 from avril-gh/Remove-PHP-closing-tags-#979

Fixes #1277 Remove PHP closing tags.