mirror of
https://github.com/ramsey/uuid.git
synced 2026-06-16 16:17:43 +03:00
Improve test coverage
This commit is contained in:
@@ -102,7 +102,7 @@ final class BrickMathCalculator implements CalculatorInterface
|
||||
{
|
||||
try {
|
||||
return new IntegerObject((string) BigInteger::fromBase($value, $base));
|
||||
} catch (MathException $exception) {
|
||||
} catch (MathException | \InvalidArgumentException $exception) {
|
||||
throw new InvalidArgumentException(
|
||||
$exception->getMessage(),
|
||||
(int) $exception->getCode(),
|
||||
@@ -115,7 +115,7 @@ final class BrickMathCalculator implements CalculatorInterface
|
||||
{
|
||||
try {
|
||||
return BigInteger::of($value->toString())->toBase($base);
|
||||
} catch (MathException $exception) {
|
||||
} catch (MathException | \InvalidArgumentException $exception) {
|
||||
throw new InvalidArgumentException(
|
||||
$exception->getMessage(),
|
||||
(int) $exception->getCode(),
|
||||
|
||||
Reference in New Issue
Block a user