Re: Vote Details for "Math_Polynomial" by arnaud

From: Date: Sat, 19 Nov 2005 18:06:36 +0000
Subject: Re: Vote Details for "Math_Polynomial" by arnaud
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-40431@lists.php.net to get a copy of this message
Arnaud: I believe I fixed the coding style issues you had with my Math_Polynomial proposal, thanks for the thoughts. As far as the get_class($obj) calls though, any place I do this I am comparing the result from get_class($obj) to get_class($this), so they should both be case-sensitive, and there really is no reason to use strtolower() in these cases. If I was doing: if (get_class($obj) == "polynomial") then it would be a different story... but I don't see any problem with: if (get_class($obj) == get_class($this)) ...do you? - Keith --- original message --- CS issues. if (is_string($mixed_poly)) // Parse from string $this -> _parsePolynomial(trim($mixed_poly)); else if (is_object($mixed_poly) and get_class($mixed_poly) == get_class($this)) // Load from another Polynomail { should be if () { $this->_parse } else { } In short, there should be curly braces after the if statement and there should not be spaces when calling an object's method ($this->myMethod()). You should also use strtolower(get_class()) as get_class returns a case-sensitive class name.

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