public function toFloat($value) { try { return Helper::toFloat($value); } catch (InvalidArgumentException $e) { // Throw old exception for legacy implementations. throw new InvalidRequestException($e->getMessage(), $e->getCode(), $e); } }