Skip to content
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

Merged
merged 3 commits into from
Aug 24, 2017

Conversation

Zales0123
Copy link
Member

Q A
Bug fix? no
New feature? no
BC breaks? yes
Related tickets #8425
License MIT

@pamil pamil mentioned this pull request Aug 23, 2017
30 tasks
@Zales0123 Zales0123 added BC Break PRs introducing BC breaks (do not even try to merge). Enhancement Minor issues and PRs improving the current solutions (optimizations, typo fixes, etc.). PHP 7.1 labels Aug 23, 2017
@Zales0123 Zales0123 requested a review from pamil August 23, 2017 14:07
@@ -203,7 +203,7 @@ public function getInventoryName()
/**
* {@inheritdoc}
*/
public function getShippingCategory()
public function getShippingCategory(): ? ShippingCategoryInterface
Copy link
Contributor

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);
Copy link
Contributor

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
Copy link
Contributor

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;
Copy link
Contributor

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.

@pamil pamil merged commit 14b21dc into Sylius:master Aug 24, 2017
@pamil
Copy link
Contributor

pamil commented Aug 24, 2017

Thanks!

@Zales0123 Zales0123 deleted the scalar-types-shipping branch August 24, 2017 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BC Break PRs introducing BC breaks (do not even try to merge). Enhancement Minor issues and PRs improving the current solutions (optimizations, typo fixes, etc.).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants