localeResolver = $localeResolver; $this->localFilter = $localFilter; } /** * Process localized quantity to internal format * * @param float $qty * @return array|string */ public function process($qty) { $this->localFilter->setOptions(['locale' => $this->localeResolver->getLocale()]); $qty = $this->localFilter->filter((double)$qty); if ($qty < 0) { $qty = null; } return $qty; } }