added phpdoc
fixed code style
fixed code style