uawdijnntqw1x1x1
IP : 216.73.216.58
Hostname : toronto-dev2
Kernel : Linux toronto-dev2 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
Disable Function : None :)
OS : Linux
PATH:
/
srv
/
users
/
craft4
/
apps
/
craft4-newsite-space
/
vendor
/
craftcms
/
commerce
/
src
/
helpers
/
Localization.php
/
/
<?php /** * @link https://craftcms.com/ * @copyright Copyright (c) Pixel & Tonic, Inc. * @license https://craftcms.github.io/license/ */ namespace craft\commerce\helpers; use Craft; use craft\i18n\Locale; /** * Localization Helper * * @author Pixel & Tonic, Inc. <support@pixelandtonic.com> * @since 3.4.10 */ abstract class Localization extends \craft\helpers\Localization { /** * Normalizes a percentage value into a float. * * @param int|float|string|null $number * @return float|null */ public static function normalizePercentage(mixed $number): ?float { if ($number === null) { return 0.0; } if (!is_string($number)) { return (float)$number; } $pct = Craft::$app->getFormattingLocale()->getNumberSymbol(Locale::SYMBOL_PERCENT); $number = trim($number, "$pct \t\n\r\0\x0B"); if ($number === '') { return 0.0; } return static::normalizeNumber($number) / 100; } }
/srv/users/craft4/apps/craft4-newsite-space/vendor/craftcms/commerce/src/helpers/Localization.php