Apply strict type checking to Complex suffix

This commit is contained in:
MarkBaker
2023-03-12 13:12:05 +01:00
parent a3489b5d89
commit 6836c84888
@@ -49,7 +49,7 @@ class Complex
return $e->getMessage();
}
if (($suffix == 'i') || ($suffix == 'j') || ($suffix == '')) {
if (($suffix === 'i') || ($suffix === 'j') || ($suffix === '')) {
$complex = new ComplexObject($realNumber, $imaginary, $suffix);
return (string) $complex;