Skip to content

Commit 89292d8

Browse files
authored
Merge pull request #7645 from kenjis/fix-phpstan-error-number_to_size
docs: add @phpstan-ignore-next-line in number_to_size()
2 parents 93006e3 + 5cfefc0 commit 89292d8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

system/Helpers/number_helper.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@ function number_to_size($num, int $precision = 1, ?string $locale = null)
2424
{
2525
// Strip any formatting & ensure numeric input
2626
try {
27+
// @phpstan-ignore-next-line
2728
$num = 0 + str_replace(',', '', $num);
2829
} catch (ErrorException $ee) {
30+
// Catch "Warning: A non-numeric value encountered"
2931
return false;
3032
}
3133

0 commit comments

Comments
 (0)