Merge pull request #3452 from PHPOffice/Minor-Bugfix_Apply-strict-validation-to-Complex-suffix

Apply strict type checking to Complex suffix
This commit is contained in:
Mark Baker
2023-03-12 16:00:38 +01:00
committed by GitHub
@@ -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;