diff --git a/src/Calculator/BcMathCalculator.php b/src/Calculator/BcMathCalculator.php index 087b3c05..123af44c 100644 --- a/src/Calculator/BcMathCalculator.php +++ b/src/Calculator/BcMathCalculator.php @@ -226,6 +226,6 @@ public static function mod(string $amount, string $divisor): string throw InvalidArgumentException::moduloByZero(); } - return bcmod($amount, $divisor) ?? '0'; + return bcmod($amount, $divisor); } } diff --git a/src/Currencies/CryptoCurrencies.php b/src/Currencies/CryptoCurrencies.php index b1a400c8..bce86b9b 100644 --- a/src/Currencies/CryptoCurrencies.php +++ b/src/Currencies/CryptoCurrencies.php @@ -82,14 +82,12 @@ private function getCurrencies(): array * minorUnit: positive-int|0 * }> * - * @psalm-suppress MoreSpecificReturnType do not specify all keys and values */ private function loadCurrencies(): array { $file = __DIR__ . '/../../resources/binance.php'; if (is_file($file)) { - /** @psalm-suppress LessSpecificReturnStatement */ return require $file; } diff --git a/src/Currencies/ISOCurrencies.php b/src/Currencies/ISOCurrencies.php index 415a14ca..177f09dd 100644 --- a/src/Currencies/ISOCurrencies.php +++ b/src/Currencies/ISOCurrencies.php @@ -102,14 +102,12 @@ private function getCurrencies(): array * numericCode: positive-int * }> * - * @psalm-suppress MoreSpecificReturnType do not specify all keys and values */ private function loadCurrencies(): array { $file = __DIR__ . '/../../resources/currency.php'; if (is_file($file)) { - /** @psalm-suppress LessSpecificReturnStatement */ return require $file; } diff --git a/tests/NumberTest.php b/tests/NumberTest.php index 20104f9d..08e5aa47 100644 --- a/tests/NumberTest.php +++ b/tests/NumberTest.php @@ -97,6 +97,8 @@ public function itCreatesANumberFromAFloatingPointValue(): void * }> * * @psalm-suppress InvalidOperand + * @psalm-suppress LessSpecificReturnStatement + * @psalm-suppress MoreSpecificReturnType * * the {@see PHP_INT_MAX} operations below cannot be inferred to numeric-string * the {@see PHP_INT_MAX} operations below cannot be inferred to numeric-string