Cleanup and re-format the PHP code

Merged Timothée Jaussoin requested to merge feature/xml-reformat into master

Rewrite the XML generation using DOMDocument

Merge request reports