Skip to content
This repository has been archived by the owner on Dec 19, 2019. It is now read-only.

Resolve coupling between objects in \Magento\QuoteGraphQl\Model\Cart\SetBillingAddressOnCart #488

Merged
merged 4 commits into from
Apr 5, 2019

Conversation

vasilii-b
Copy link

Description (*)

Fixed issue #468

Fixed Issues (if relevant)

  1. Resolve coupling between objects in \Magento\QuoteGraphQl\Model\Cart\SetBillingAddressOnCart #468

Manual testing scenarios (*)

  1. Go to /dev/tests/static/ (CLI cd /dev/tests/static/ from project root folder)
  2. Prepare your phpunit.xml from phpunit.xml.dist
  3. run ../../../vendor/bin/phpunit
  4. Tests results should be green

image

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

…`\Magento\QuoteGraphQl\Model\Cart\SetBillingAddressOnCart`
@vasilii-b vasilii-b changed the title magento/graphql-ce#468 - Resolve coupling between objects in \Magento\QuoteGraphQl\Model\Cart\SetBillingAddressOnCart Resolve coupling between objects in \Magento\QuoteGraphQl\Model\Cart\SetBillingAddressOnCart Mar 16, 2019
* @param int|string|null $customerAddressId
* @param array|null $customerAddress
* @return Address
* @throws GraphQlAuthenticationException
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usually @throws annotation tags are added only when exception is thrown explicitly in the function. Any other exceptions from parent methods are implicit and not annotated. "Missing @throws tag(s)" can be turned off in PHPStorm Inspections->PHP->PHPDoc

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for mentioning, @TomashKhamlai. I've added requested changes. Thank you!

Copy link
Contributor

@naydav naydav Apr 3, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usually @throws annotation tags are added only when exception is thrown explicitly in the function

I little disagree with this statement. If I work with some API I will prefer to know which of exception could be thrown without submerging in implementation (does not matter will be thrown in current method or in some child classes)

Generally, it's about readability.

@TomashKhamlai
Copy link
Contributor

@naydav. Checked. Works as expected

Vasilii and others added 3 commits March 21, 2019 09:44
# Fixed issue "@throws annotation tags are added only when exception is thrown explicitly in the function"
@ghost
Copy link

ghost commented Apr 5, 2019

Hi @vasilii-b, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants