File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -134,16 +134,7 @@ public abstract function cartWithItems();
134134
135135 public abstract function deliveryMethod ();
136136
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 ();
147138
148139 public abstract function customer ();
149140
Original file line number Diff line number Diff line change 88
99class Helper {
1010 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+
1113
1214 public static function isConsistentCart ( $ cart ) {
1315 $ totals = self ::totals ( $ cart );
@@ -42,4 +44,8 @@ public static function removeNulls( $data ) {
4244 public static function notNull ( $ value1 , $ value2 ) {
4345 return is_null ( $ value1 ) ? $ value2 : $ value1 ;
4446 }
47+
48+ public static function integerPrice ( $ price ) {
49+ return intval ( round ( self ::$ centsPerWhole * $ price ) );
50+ }
4551}
You can’t perform that action at this time.
0 commit comments