File tree Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -134,16 +134,7 @@ public abstract function cartWithItems();
134
134
135
135
public abstract function deliveryMethod ();
136
136
137
- public function items ()
138
- {
139
- return array_merge (
140
- $ this ->productItem (),
141
- $ this ->extraItems (),
142
- $ this ->handlingItems ()
143
- );
144
- }
145
-
146
- public abstract function handlingItems ();
137
+ public abstract function items ();
147
138
148
139
public abstract function customer ();
149
140
Original file line number Diff line number Diff line change 8
8
9
9
class Helper {
10
10
const ISO8601_PATTERN = '^((\d{4})-([0-1]\d)-([0-3]\d))+$|P(\d+Y)?(\d+M)?(\d+W)?(\d+D)?(T(\d+H)?(\d+M)?(\d+S)?)?$ ' ;
11
+ static $ centsPerWhole = 100 ;
12
+
11
13
12
14
public static function isConsistentCart ( $ cart ) {
13
15
$ totals = self ::totals ( $ cart );
@@ -42,4 +44,8 @@ public static function removeNulls( $data ) {
42
44
public static function notNull ( $ value1 , $ value2 ) {
43
45
return is_null ( $ value1 ) ? $ value2 : $ value1 ;
44
46
}
47
+
48
+ public static function integerPrice ( $ price ) {
49
+ return intval ( round ( self ::$ centsPerWhole * $ price ) );
50
+ }
45
51
}
You can’t perform that action at this time.
0 commit comments