Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.2.0

Request #17548 Refactor output methods
Submitted: 2010-07-02 04:29 UTC
From: doconnor Assigned:
Status: Open Package: Net_IDNA2 (version SVN)
PHP Version: Irrelevant OS:
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 42 + 11 = ?

 
 [2010-07-02 04:29 UTC] doconnor (Daniel O'Connor)
Description: ------------ This is horrid: switch (($one_time_encoding) ? $one_time_encoding : $this->_api_encoding) { case 'utf8': return $return; break; case 'ucs4_string': return $this->_ucs4_to_ucs4_string($this->_utf8_to_ucs4($return)); break; case 'ucs4_array': return $this->_utf8_to_ucs4($return); break; default: throw new Exception('Unsupported output format'); } 1. Refactor the assorted private methods into classes for rendering output 2. Inject the appropriate one at the appropriate time 3. Test the heck out of it

Comments