-
-
Notifications
You must be signed in to change notification settings - Fork 126
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
Coupon mutations added. #510
Conversation
fafcacb
to
1b77be8
Compare
1b77be8
to
d12b36b
Compare
a650297
to
9a4f3ef
Compare
9a4f3ef
to
242c3f7
Compare
public static function mutate_and_get_payload( $input, AppContext $context, ResolveInfo $info ) { | ||
// Retrieve order ID. | ||
$coupon_id = 0; | ||
if ( ! empty( $input['id'] ) && is_numeric( $input['id'] ) ) { |
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.
Identical blocks of code found in 2 locations. Consider refactoring.
public static function mutate_and_get_payload( $input, AppContext $context, ResolveInfo $info ) { | ||
// Retrieve order ID. | ||
$coupon_id = 0; | ||
if ( ! empty( $input['id'] ) && is_numeric( $input['id'] ) ) { |
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.
Identical blocks of code found in 2 locations. Consider refactoring.
* | ||
* @return callable | ||
*/ | ||
public static function mutate_and_get_payload( $input, AppContext $context, ResolveInfo $info ) { |
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.
Function mutate_and_get_payload
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
* | ||
* @return callable | ||
*/ | ||
public static function mutate_and_get_payload( $input, AppContext $context, ResolveInfo $info ) { |
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.
Function mutate_and_get_payload
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
c62bf3b
to
85a5336
Compare
85a5336
to
7edaf4f
Compare
There are too many results to compare The test coverage on the diff in this pull request is 88.8% (50% is the threshold). This pull request will bring the total coverage in the repository to 77.1% (0.1% change). View more on Code Climate. |
Your checklist for this pull request
Thanks for sending a pull request! Please make sure you click the link above to view the contribution guidelines, then fill out the blanks below.
🚨Please review the guidelines for contributing to this repository.
What does this implement/fix? Explain your changes.
Does this close any currently open issues?
Resolves #14
Any relevant logs, error output, GraphiQL screenshots, etc?
(If it’s long, please paste to https://ghostbin.com/ and insert the link here.)
Any other comments?
…
Where has this been tested?