[PEPr] Comment on Internationalization::I18N_UnicodeNormalizer

From: Date: Mon, 11 Jun 2007 21:33:14 +0000
Subject: [PEPr] Comment on Internationalization::I18N_UnicodeNormalizer
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-47027@lists.php.net to get a copy of this message
Till Klampaeckel (http://pear.php.net/user/till) has commented on the proposal for Internationalization::I18N_UnicodeNormalizer. Comment: In general I like this a lot as well, since it looks like what I've been looking for in PHP. ;-) I am not sure I like the __construct($root='') part where you prepend a root directory to constant (a path) which is defined inside the class and not adjustable (through a set()). Instead I'd remove the constant and only use the $root (and probably call it something else). Not sure if you have to since this doesn't improve performance but it wouldn't hurt to test if the directory exists and so on and throw an Exception. In general, some of your code is hard to read (lines are pretty long) and some of the if()'s seem a bit complicated - for example, exit early, instead of long code inside the condition and exit in the else part. Then, I'd (personally) always use empty() to test instead of, if ($foo != ''). But I guess that's called CS or maybe "IMHO". :-) Also, you shoud list the multibyte extension as a dependency. Proposal information: http://pear.php.net/pepr/pepr-proposal-show.php?id=494 -- Sent by PEPr, the automatic proposal system at http://pear.php.net

« previous php.pear.dev (#47027) next »