Using (int) in the result of ShippingMethod::fromData() distorts the result of the min_weight and max_weight in some cases.
Indeed, the result of (int)(1.001*1000) is 1000, while we expect to have 1001.
To avoid this, it could be possible to combine intval() and ceil(), like this:
https://github.com/Webador/sendcloud/blob/81dbffecf1c332ac5ca296e86d7799ac877c9e97/src/Model/ShippingMethod.php#L17
Using (int) in the result of
ShippingMethod::fromData()
distorts the result of themin_weight
andmax_weight
in some cases. Indeed, the result of(int)(1.001*1000)
is 1000, while we expect to have 1001.To avoid this, it could be possible to combine intval() and ceil(), like this: