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)
135
135
}
136
136
137
137
$ filter = new LocalizedToNormalized (
138
- ['locale ' => $ this ->resolver ->getLocale (), ' type ' => NumberFormatter:: TYPE_DOUBLE ]
138
+ ['locale ' => $ this ->resolver ->getLocale ()]
139
139
);
140
140
return $ filter ->filter ((string )$ itemQty );
141
141
}
Original file line number Diff line number Diff line change @@ -20,8 +20,7 @@ class LocalizedToNormalized implements FilterInterface
20
20
protected $ _options = [
21
21
'locale ' => null ,
22
22
'date_format ' => null ,
23
- 'precision ' => null ,
24
- 'type ' => null ,
23
+ 'precision ' => null
25
24
];
26
25
27
26
/**
@@ -69,12 +68,8 @@ public function filter($value)
69
68
{
70
69
if (is_numeric ($ value )) {
71
70
$ numberParse = new NumberParse (
72
- $ this ->_options ['locale ' ],
73
- empty ($ this ->_options ['type ' ])
74
- ? NumberFormatter::TYPE_DOUBLE
75
- : $ this ->_options ['type ' ]
71
+ $ this ->_options ['locale ' ]
76
72
);
77
-
78
73
return (string )$ numberParse ->filter ($ value );
79
74
} elseif ($ this ->_options ['date_format ' ] === null && strpos ($ value , ': ' ) !== false ) {
80
75
$ formatter = new IntlDateFormatter (
Original file line number Diff line number Diff line change @@ -39,8 +39,7 @@ public static function localizedToNormalizedDataProvider()
39
39
[
40
40
'locale ' => 'nl ' ,
41
41
'date_format ' => null ,
42
- 'precision ' => null ,
43
- 'type ' => NumberFormatter::TYPE_DOUBLE
42
+ 'precision ' => null
44
43
],
45
44
"0.5 "
46
45
],
@@ -49,8 +48,7 @@ public static function localizedToNormalizedDataProvider()
49
48
[
50
49
'locale ' => 'en ' ,
51
50
'date_format ' => null ,
52
- 'precision ' => null ,
53
- 'type ' => ' '
51
+ 'precision ' => null
54
52
],
55
53
"0.5 "
56
54
],
@@ -59,8 +57,7 @@ public static function localizedToNormalizedDataProvider()
59
57
[
60
58
'locale ' => 'en ' ,
61
59
'date_format ' => null ,
62
- 'precision ' => null ,
63
- 'type ' => ''
60
+ 'precision ' => null
64
61
],
65
62
"2 "
66
63
],
@@ -69,8 +66,7 @@ public static function localizedToNormalizedDataProvider()
69
66
[
70
67
'locale ' => 'en ' ,
71
68
'date_format ' => 'Y-M-d ' ,
72
- 'precision ' => null ,
73
- 'type ' => ''
69
+ 'precision ' => null
74
70
],
75
71
[
76
72
"date_format " => "Y-M-d " ,
You can’t perform that action at this time.
0 commit comments