fixed php-docs and reformat code