From 34740e66a6365dd88e31b039b2af99809281f3b8 Mon Sep 17 00:00:00 2001 From: Gaurav Date: Thu, 31 Mar 2022 10:09:40 +0530 Subject: [PATCH] fix: import exception --- src/PriceFormatter.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/PriceFormatter.php b/src/PriceFormatter.php index e220485..67f04a9 100644 --- a/src/PriceFormatter.php +++ b/src/PriceFormatter.php @@ -5,6 +5,7 @@ declare(strict_types=1); namespace ArchTech\Money; use ArchTech\Money\Exceptions\CannotExtractCurrencyException; +use Exception; class PriceFormatter { @@ -38,7 +39,7 @@ class PriceFormatter $removeNonDigits = preg_replace('/[^\d' . preg_quote($currency->decimalSeparator()) . ']/', '', $formatted); if (! is_string($removeNonDigits)) { - throw new \Exception('The formatted string could not be resolved to a valid number.'); + throw new Exception('The formatted string could not be resolved to a valid number.'); } return (float) str_replace($currency->decimalSeparator(), '.', $removeNonDigits);