improving the build script

updated the coding standard from PEAR to PSR-2;
updated the cod output from raw text to xml
shuffling the metrics generation