Skip to content

Commit

Permalink
address psalm warnings from version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
Firehed committed Jul 19, 2023
1 parent 158c9d7 commit 50acc09
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/Calculator/BcMathCalculator.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,6 @@ public static function mod(string $amount, string $divisor): string
throw InvalidArgumentException::moduloByZero();
}

return bcmod($amount, $divisor) ?? '0';
return bcmod($amount, $divisor);
}
}
3 changes: 0 additions & 3 deletions src/Currencies/CryptoCurrencies.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,12 @@ private function getCurrencies(): array
* symbol: non-empty-string,
* 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;
}

Expand Down
3 changes: 0 additions & 3 deletions src/Currencies/ISOCurrencies.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,12 @@ private function getCurrencies(): array
* minorUnit: positive-int|0,
* 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;
}

Expand Down
4 changes: 4 additions & 0 deletions src/PHPUnit/Comparator.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ public function assertEquals(
throw new ComparisonFailure($expected, $actual, $this->formatter->format($expected), $this->formatter->format($actual), 'Failed asserting that two Money objects are equal.');
}

/**
* @psalm-suppress TooManyArguments
* @psalm-suppress InvalidArgument
*/
throw new ComparisonFailure($expected, $actual, $this->formatter->format($expected), $this->formatter->format($actual), false, 'Failed asserting that two Money objects are equal.');
}
}
Expand Down

0 comments on commit 50acc09

Please sign in to comment.