aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/brick/math/src/Exception
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/brick/math/src/Exception')
-rw-r--r--vendor/brick/math/src/Exception/NumberFormatException.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/vendor/brick/math/src/Exception/NumberFormatException.php b/vendor/brick/math/src/Exception/NumberFormatException.php
index d9cf6ff5f..119cadbb4 100644
--- a/vendor/brick/math/src/Exception/NumberFormatException.php
+++ b/vendor/brick/math/src/Exception/NumberFormatException.php
@@ -9,6 +9,14 @@ namespace Brick\Math\Exception;
*/
class NumberFormatException extends MathException
{
+ public static function invalidFormat(string $value) : self
+ {
+ return new self(\sprintf(
+ 'The given value "%s" does not represent a valid number.',
+ $value,
+ ));
+ }
+
/**
* @param string $char The failing character.
*
@@ -28,6 +36,6 @@ class NumberFormatException extends MathException
$char = '"' . $char . '"';
}
- return new self(sprintf('Char %s is not a valid character in the given alphabet.', $char));
+ return new self(\sprintf('Char %s is not a valid character in the given alphabet.', $char));
}
}