| @@ -175,13 +175,10 @@ | ||
| 175 | 175 | // We've been given a string to parse to extract the real and imaginary parts, and any suffix |
| 176 | 176 | list($realPart, $imaginaryPart, $suffix) = self::parseComplex($realPart); |
| 177 | 177 | } |
| 178 | 178 | } |
| 179 | - | |
| 180 | - if ($imaginaryPart != 0.0 && empty($suffix)) { | |
| 179 | + if ($imaginaryPart <> 0.0 && empty($suffix)) { | |
| 181 | 180 | $suffix = 'i'; |
| 182 | - } elseif ($imaginaryPart == 0.0 && !empty($suffix)) { | |
| 183 | - $suffix = ''; | |
| 184 | 181 | } |
| 185 | 182 | |
| 186 | 183 | // Set parsed values in our properties |
| 187 | 184 | $this->realPart = (float) $realPart; |
| @@ -375,14 +372,14 @@ | ||
| 375 | 372 | { |
| 376 | 373 | $functionName = strtolower(str_replace('_', '', $functionName)); |
| 377 | 374 | |
| 378 | 375 | // Test for function calls |
| 379 | - if (in_array($functionName, self::$functions, true)) { | |
| 376 | + if (in_array($functionName, self::$functions)) { | |
| 380 | 377 | $functionName = "\\" . __NAMESPACE__ . "\\{$functionName}"; |
| 381 | 378 | return $functionName($this, ...$arguments); |
| 382 | 379 | } |
| 383 | 380 | // Test for operation calls |
| 384 | - if (in_array($functionName, self::$operations, true)) { | |
| 381 | + if (in_array($functionName, self::$operations)) { | |
| 385 | 382 | $functionName = "\\" . __NAMESPACE__ . "\\{$functionName}"; |
| 386 | 383 | return $functionName($this, ...$arguments); |
| 387 | 384 | } |
| 388 | 385 | throw new Exception('Function or Operation does not exist'); |