Skip to content

Commit bdd2b50

Browse files
committed
fix: remove the phpstan message.
1 parent 63ba16f commit bdd2b50

2 files changed

Lines changed: 2 additions & 7 deletions

File tree

phpstan-baseline.neon.dist

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -155,11 +155,6 @@ parameters:
155155
count: 1
156156
path: system/Helpers/filesystem_helper.php
157157

158-
-
159-
message: "#^Binary operation \"\\+\" between 0 and string results in an error\\.$#"
160-
count: 1
161-
path: system/Helpers/number_helper.php
162-
163158
-
164159
message: "#^Property CodeIgniter\\\\Images\\\\Handlers\\\\BaseHandler\\:\\:\\$image \\(CodeIgniter\\\\Images\\\\Image\\) in empty\\(\\) is not falsy\\.$#"
165160
count: 1

system/Helpers/number_helper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,15 @@ function number_to_size($num, int $precision = 1, ?string $locale = null)
6969
*
7070
* @see https://simple.wikipedia.org/wiki/Names_for_large_numbers
7171
*
72-
* @param string $num
72+
* @param int|string $num
7373
*
7474
* @return bool|string
7575
*/
7676
function number_to_amount($num, int $precision = 0, ?string $locale = null)
7777
{
7878
// Strip any formatting & ensure numeric input
7979
try {
80-
$num = 0 + str_replace(',', '', $num);
80+
$num = 0 + (int) str_replace(',', '', $num);
8181
} catch (ErrorException $ee) {
8282
return false;
8383
}

0 commit comments

Comments
 (0)