Vote Details for "Math_Polynomial" by justinpatrin

» Details
» Comment
As others have said, GPL license isn't allowed in PEAR. I would suggest LGPL or BSD.

The packaging needs to be addressed (the tgz you supplied isn't a PEAR package tarball) but this can obviously be dealt with once the package is accepted.

Please remove the .class from the filenames.

get_class() isn't the right way to check for the right object type. It precludes extension. Please use is_a() instead.

And also CS issues (yes, they're important).

return should not have parenthesis (it is a language construct, not a function).

equalsSum() should return/raise an error if the wrong # of arguments is passed in instead of returning and doing nothing. Same for equalsDifference(), etc.

"and" should be &&, "or" should be ||.

"else" should always be on the same line as }. (You use 3 different styles in different places).

Not conditions, just requests:

Support for variabel other than 'x' would be nice (and fairly easily implemented I would think), although if it slows things down I can understand not implementing it for now.

I would appreciate it if you would change your strings from using " to using '. Since you do no variable interpolation ' is more appropriate (see previous threads on the pear lists for more).

I know quite a bit about polynomials but wasn't able to really dig into your algorithms. The examples seem to run ok, so I think the code should be good.