extract CodeGenMethod
fix phpdoc