mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-09-01 21:19:18 +00:00
Correcting PHPStan type warning
PHPStan failed because of a binary operation "/" between string and 100.0. Fixed this by casting the result of `str_replace` to a float.
This commit is contained in:
@@ -569,7 +569,7 @@ class StringHelper
|
||||
public static function convertToNumberIfPercent(string &$operand): bool
|
||||
{
|
||||
if (strpos($operand, '%', -1) !== false) {
|
||||
$operand = (str_replace('%', '', $operand) / 100.00);
|
||||
$operand = ((float)(str_replace('%', '', $operand)) / 100.00);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user