» Details |
---|
|
» Comment |
Do not use @ to silence errors/notices due to missing array keys. Make them required or use isset(). (seen in the constructor for the main class) Use " instead of ' for strings which don't have special chars or variables in them. (as in Hsl.php fromString()) Use the PEAR_Exception class (assuming that it has been officially comitted). You're using floatval() in some places and (float) in others. Please use one or ethe other. Personally I like (float) but it's your call. (Hsl.php uses floatval()) Only use printf functions when it is absolutely needed. printf is always slower than concatenation and is also slower than using "" and interpolation. Use of sprintf() in Hex.php is ok as it does further formatting (%02x) but not in Hsl.php which uses %d. %d can be replaced with concatenation and (int) if you need it. Please put spaces around the => operator. (Optional) Use ' and . instead of " for strings. Putting variables inside "" strings is less efficient and harder to notice. Why use is_null instead of === null? |