Change php types on response object