From 334dd26e3c78a36002aed34aa26aa526b11c5dfb Mon Sep 17 00:00:00 2001 From: Bruce Wells Date: Thu, 25 Oct 2018 11:42:11 -0400 Subject: Removing DivisionByZeroException testing for now Added more unit tests. --- src/NXP/Classes/Token/TokenDivision.php | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/NXP') diff --git a/src/NXP/Classes/Token/TokenDivision.php b/src/NXP/Classes/Token/TokenDivision.php index a85bec5..5bbc35e 100644 --- a/src/NXP/Classes/Token/TokenDivision.php +++ b/src/NXP/Classes/Token/TokenDivision.php @@ -59,10 +59,6 @@ class TokenDivision extends AbstractOperator throw new IncorrectExpressionException("Division requires two operators"); } - if ($op2->getValue() == 0){ - throw new DivisionByZeroException(); - } - $result = $op2->getValue() != 0 ? $op1->getValue() / $op2->getValue() : 0; return new TokenNumber($result); -- cgit v1.2.3