Skip to content

Commit

Permalink
chore: move psalm suppress to callback block, not method
Browse files Browse the repository at this point in the history
  • Loading branch information
kylemilloy committed Feb 4, 2025
1 parent d41e9fa commit 87290b1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/BigDecimal.php
Original file line number Diff line number Diff line change
Expand Up @@ -661,10 +661,10 @@ public function toFloat() : float
return (float) (string) $this;
}

/** @psalm-suppress ImpureFunctionCall */
protected function resolveOptionalCallback(bool|Closure $cb) : bool
{
if ($cb instanceof Closure) {
/** @psalm-suppress ImpureFunctionCall */
return (bool) $cb($this);
}

Expand Down
2 changes: 1 addition & 1 deletion src/BigInteger.php
Original file line number Diff line number Diff line change
Expand Up @@ -1026,10 +1026,10 @@ public function toBytes(bool $signed = true) : string
return \hex2bin($hex);
}

/** @psalm-suppress ImpureFunctionCall */
protected function resolveOptionalCallback(bool|Closure $cb) : bool
{
if ($cb instanceof Closure) {
/** @psalm-suppress ImpureFunctionCall */
return (bool) $cb($this);
}

Expand Down
2 changes: 1 addition & 1 deletion src/BigRational.php
Original file line number Diff line number Diff line change
Expand Up @@ -380,10 +380,10 @@ public function toFloat() : float
return $simplified->numerator->toFloat() / $simplified->denominator->toFloat();
}

/** @psalm-suppress ImpureFunctionCall */
protected function resolveOptionalCallback(bool|Closure $cb) : bool
{
if ($cb instanceof Closure) {
/** @psalm-suppress ImpureFunctionCall */
return (bool) $cb($this);
}

Expand Down

0 comments on commit 87290b1

Please sign in to comment.