File tree Expand file tree Collapse file tree 3 files changed +7
-16
lines changed
app/code/Magento/Checkout/Model
lib/internal/Magento/Framework/Filter Expand file tree Collapse file tree 3 files changed +7
-16
lines changed Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ protected function normalize($itemQty)
135135 }
136136
137137 $ filter = new LocalizedToNormalized (
138- ['locale ' => $ this ->resolver ->getLocale (), ' type ' => NumberFormatter:: TYPE_DOUBLE ]
138+ ['locale ' => $ this ->resolver ->getLocale ()]
139139 );
140140 return $ filter ->filter ((string )$ itemQty );
141141 }
Original file line number Diff line number Diff line change @@ -20,8 +20,7 @@ class LocalizedToNormalized implements FilterInterface
2020 protected $ _options = [
2121 'locale ' => null ,
2222 'date_format ' => null ,
23- 'precision ' => null ,
24- 'type ' => null ,
23+ 'precision ' => null
2524 ];
2625
2726 /**
@@ -69,12 +68,8 @@ public function filter($value)
6968 {
7069 if (is_numeric ($ value )) {
7170 $ numberParse = new NumberParse (
72- $ this ->_options ['locale ' ],
73- empty ($ this ->_options ['type ' ])
74- ? NumberFormatter::TYPE_DOUBLE
75- : $ this ->_options ['type ' ]
71+ $ this ->_options ['locale ' ]
7672 );
77-
7873 return (string )$ numberParse ->filter ($ value );
7974 } elseif ($ this ->_options ['date_format ' ] === null && strpos ($ value , ': ' ) !== false ) {
8075 $ formatter = new IntlDateFormatter (
Original file line number Diff line number Diff line change @@ -39,8 +39,7 @@ public static function localizedToNormalizedDataProvider()
3939 [
4040 'locale ' => 'nl ' ,
4141 'date_format ' => null ,
42- 'precision ' => null ,
43- 'type ' => NumberFormatter::TYPE_DOUBLE
42+ 'precision ' => null
4443 ],
4544 "0.5 "
4645 ],
@@ -49,8 +48,7 @@ public static function localizedToNormalizedDataProvider()
4948 [
5049 'locale ' => 'en ' ,
5150 'date_format ' => null ,
52- 'precision ' => null ,
53- 'type ' => ' '
51+ 'precision ' => null
5452 ],
5553 "0.5 "
5654 ],
@@ -59,8 +57,7 @@ public static function localizedToNormalizedDataProvider()
5957 [
6058 'locale ' => 'en ' ,
6159 'date_format ' => null ,
62- 'precision ' => null ,
63- 'type ' => ''
60+ 'precision ' => null
6461 ],
6562 "2 "
6663 ],
@@ -69,8 +66,7 @@ public static function localizedToNormalizedDataProvider()
6966 [
7067 'locale ' => 'en ' ,
7168 'date_format ' => 'Y-M-d ' ,
72- 'precision ' => null ,
73- 'type ' => ''
69+ 'precision ' => null
7470 ],
7571 [
7672 "date_format " => "Y-M-d " ,
You can’t perform that action at this time.
0 commit comments