@@ -160,7 +160,8 @@ public function getConfigFlag($field)
160
160
}
161
161
162
162
/**
163
- * Do request to shipment
163
+ * Do request to shipment.
164
+ *
164
165
* Implementation must be in overridden method
165
166
*
166
167
* @param Request $request
@@ -173,7 +174,8 @@ public function requestToShipment($request)
173
174
}
174
175
175
176
/**
176
- * Do return of shipment
177
+ * Do return of shipment.
178
+ *
177
179
* Implementation must be in overridden method
178
180
*
179
181
* @param Request $request
@@ -275,6 +277,8 @@ public function getDeliveryConfirmationTypes(\Magento\Framework\DataObject $para
275
277
}
276
278
277
279
/**
280
+ * Validate request for available ship countries.
281
+ *
278
282
* @param \Magento\Framework\DataObject $request
279
283
* @return $this|bool|false|\Magento\Framework\Model\AbstractModel
280
284
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
@@ -400,6 +404,8 @@ public function getSortOrder()
400
404
}
401
405
402
406
/**
407
+ * Allows free shipping when all product items have free shipping.
408
+ *
403
409
* @param \Magento\Quote\Model\Quote\Address\RateRequest $request
404
410
* @return void
405
411
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
@@ -531,10 +537,10 @@ protected function _getPerorderPrice($cost, $handlingType, $handlingFee)
531
537
}
532
538
533
539
/**
534
- * Sets the number of boxes for shipping
540
+ * Gets the average weight of each box available for shipping
535
541
*
536
- * @param int $weight in some measure
537
- * @return int
542
+ * @param float $weight in some measure
543
+ * @return float
538
544
*/
539
545
public function getTotalNumOfBoxes ($ weight )
540
546
{
@@ -545,7 +551,7 @@ public function getTotalNumOfBoxes($weight)
545
551
$ maxPackageWeight = $ this ->getConfigData ('max_package_weight ' );
546
552
if ($ weight > $ maxPackageWeight && $ maxPackageWeight != 0 ) {
547
553
$ this ->_numBoxes = ceil ($ weight / $ maxPackageWeight );
548
- $ weight = $ weight / $ this ->_numBoxes ;
554
+ $ weight = ( float ) $ weight / $ this ->_numBoxes ;
549
555
}
550
556
551
557
return $ weight ;
@@ -671,7 +677,8 @@ protected function filterDebugData($data)
671
677
}
672
678
673
679
/**
674
- * Recursive replace sensitive xml nodes values by specified mask
680
+ * Recursive replace sensitive xml nodes values by specified mask.
681
+ *
675
682
* @param \SimpleXMLElement $xml
676
683
* @return void
677
684
*/
0 commit comments