Fix typehints and phpdoc.