fix phpdoc in api factory