added php doc to methods and comments