Big phpdoc fixes patch

Now you can use chaining normally by ide's autocompletion. Some other small phpdoc sugar. Fixed some typos.