-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Shipping] Scalar types in Shippings #8440
Conversation
Zales0123
commented
Aug 23, 2017
Q | A |
---|---|
Bug fix? | no |
New feature? | no |
BC breaks? | yes |
Related tickets | #8425 |
License | MIT |
11e9209
to
d0b01d3
Compare
@@ -203,7 +203,7 @@ public function getInventoryName() | |||
/** | |||
* {@inheritdoc} | |||
*/ | |||
public function getShippingCategory() | |||
public function getShippingCategory(): ? ShippingCategoryInterface |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CS
@@ -111,27 +111,27 @@ function its_height_is_mutable() | |||
function it_returns_correct_shipping_weight() | |||
{ | |||
$this->setWeight(140); | |||
$this->getShippingWeight()->shouldReturn(140); | |||
$this->getShippingWeight()->shouldReturn(140.00); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks weird, setting 140 and expecting 140.00
@@ -185,7 +185,7 @@ public function getShippables() | |||
/** | |||
* {@inheritdoc} | |||
*/ | |||
public function getShippingWeight() | |||
public function getShippingWeight(): int |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't $unit->getShippable()->getShippingWeight()
float?
@@ -23,25 +23,25 @@ | |||
/** | |||
* @return int | |||
*/ | |||
public function getShippingWeight(); | |||
public function getShippingWeight(): int; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we have a mismatch in storing weight / depth etc. Once at a time it's a float, another time it's an integer.
Thanks! |