Fix the phpdoc in the library

This fixes the phpdoc in the library so that IDEs don't complain anymore about invalid return types when using the Browser.
It also fixes the CS. This is a mix of applying the PHP-CS-Fixer (for code written in the library itself) and fixing the code generator to avoid adding trailing whitespaces in the GeneratedBrowser.

the third commit is fixing the documented type for methods returning an integer