File GuestCheckoutSessionApi.php
has 1268 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* This file is part of the trollandtoad/ebay-sdk-php package.
*
GuestCheckoutSessionApi
has 40 functions (exceeds 20 allowed). Consider refactoring. Open
class GuestCheckoutSessionApi
{
/**
* @var ClientInterface
*/
Function applyGuestCouponRequest
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
public function applyGuestCouponRequest($checkout_session_id, $x_ebay_c_marketplace_id, $coupon_request = null)
{
// Verify the required parameter 'checkout_session_id' is set.
if ($checkout_session_id === null || (\is_array($checkout_session_id) && count($checkout_session_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $checkout_session_id when calling applyGuestCoupon');
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function updateGuestQuantityRequest
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
public function updateGuestQuantityRequest($checkout_session_id, $x_ebay_c_marketplace_id, $update_quantity = null)
{
// Verify the required parameter 'checkout_session_id' is set.
if ($checkout_session_id === null || (\is_array($checkout_session_id) && count($checkout_session_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $checkout_session_id when calling updateGuestQuantity');
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function removeGuestCouponRequest
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
public function removeGuestCouponRequest($checkout_session_id, $x_ebay_c_marketplace_id, $coupon_request = null)
{
// Verify the required parameter 'checkout_session_id' is set.
if ($checkout_session_id === null || (\is_array($checkout_session_id) && count($checkout_session_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $checkout_session_id when calling removeGuestCoupon');
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function updateGuestShippingAddressRequest
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
public function updateGuestShippingAddressRequest($checkout_session_id, $x_ebay_c_marketplace_id, $shipping_address_impl = null)
{
// Verify the required parameter 'checkout_session_id' is set.
if ($checkout_session_id === null || (\is_array($checkout_session_id) && count($checkout_session_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $checkout_session_id when calling updateGuestShippingAddress');
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function updateGuestShippingOptionRequest
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
public function updateGuestShippingOptionRequest($checkout_session_id, $x_ebay_c_marketplace_id, $update_shipping_option = null)
{
// Verify the required parameter 'checkout_session_id' is set.
if ($checkout_session_id === null || (\is_array($checkout_session_id) && count($checkout_session_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $checkout_session_id when calling updateGuestShippingOption');
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function initiateGuestCheckoutSessionRequest
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
public function initiateGuestCheckoutSessionRequest($x_ebay_c_marketplace_id, $x_ebay_c_enduserctx = null, $create_guest_checkout_session_request_v2 = null)
{
// Verify the required parameter 'x_ebay_c_marketplace_id' is set.
if ($x_ebay_c_marketplace_id === null || (\is_array($x_ebay_c_marketplace_id) && count($x_ebay_c_marketplace_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $x_ebay_c_marketplace_id when calling initiateGuestCheckoutSession');
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function getGuestCheckoutSessionRequest
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
public function getGuestCheckoutSessionRequest($checkout_session_id, $x_ebay_c_marketplace_id)
{
// Verify the required parameter 'checkout_session_id' is set.
if ($checkout_session_id === null || (\is_array($checkout_session_id) && count($checkout_session_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $checkout_session_id when calling getGuestCheckoutSession');
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method removeGuestCouponRequest
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function removeGuestCouponRequest($checkout_session_id, $x_ebay_c_marketplace_id, $coupon_request = null)
{
// Verify the required parameter 'checkout_session_id' is set.
if ($checkout_session_id === null || (\is_array($checkout_session_id) && count($checkout_session_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $checkout_session_id when calling removeGuestCoupon');
Method updateGuestShippingOptionRequest
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function updateGuestShippingOptionRequest($checkout_session_id, $x_ebay_c_marketplace_id, $update_shipping_option = null)
{
// Verify the required parameter 'checkout_session_id' is set.
if ($checkout_session_id === null || (\is_array($checkout_session_id) && count($checkout_session_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $checkout_session_id when calling updateGuestShippingOption');
Method updateGuestQuantityRequest
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function updateGuestQuantityRequest($checkout_session_id, $x_ebay_c_marketplace_id, $update_quantity = null)
{
// Verify the required parameter 'checkout_session_id' is set.
if ($checkout_session_id === null || (\is_array($checkout_session_id) && count($checkout_session_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $checkout_session_id when calling updateGuestQuantity');
Method updateGuestShippingAddressRequest
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function updateGuestShippingAddressRequest($checkout_session_id, $x_ebay_c_marketplace_id, $shipping_address_impl = null)
{
// Verify the required parameter 'checkout_session_id' is set.
if ($checkout_session_id === null || (\is_array($checkout_session_id) && count($checkout_session_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $checkout_session_id when calling updateGuestShippingAddress');
Method applyGuestCouponRequest
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function applyGuestCouponRequest($checkout_session_id, $x_ebay_c_marketplace_id, $coupon_request = null)
{
// Verify the required parameter 'checkout_session_id' is set.
if ($checkout_session_id === null || (\is_array($checkout_session_id) && count($checkout_session_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $checkout_session_id when calling applyGuestCoupon');
Method getGuestCheckoutSessionRequest
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getGuestCheckoutSessionRequest($checkout_session_id, $x_ebay_c_marketplace_id)
{
// Verify the required parameter 'checkout_session_id' is set.
if ($checkout_session_id === null || (\is_array($checkout_session_id) && count($checkout_session_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $checkout_session_id when calling getGuestCheckoutSession');
Method initiateGuestCheckoutSessionRequest
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function initiateGuestCheckoutSessionRequest($x_ebay_c_marketplace_id, $x_ebay_c_enduserctx = null, $create_guest_checkout_session_request_v2 = null)
{
// Verify the required parameter 'x_ebay_c_marketplace_id' is set.
if ($x_ebay_c_marketplace_id === null || (\is_array($x_ebay_c_marketplace_id) && count($x_ebay_c_marketplace_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $x_ebay_c_marketplace_id when calling initiateGuestCheckoutSession');
Method removeGuestCouponWithHttpInfo
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function removeGuestCouponWithHttpInfo($checkout_session_id, $x_ebay_c_marketplace_id, $coupon_request = null)
{
$request = $this->removeGuestCouponRequest($checkout_session_id, $x_ebay_c_marketplace_id, $coupon_request);
try {
Method updateGuestQuantityWithHttpInfo
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function updateGuestQuantityWithHttpInfo($checkout_session_id, $x_ebay_c_marketplace_id, $update_quantity = null)
{
$request = $this->updateGuestQuantityRequest($checkout_session_id, $x_ebay_c_marketplace_id, $update_quantity);
try {
Method getGuestCheckoutSessionWithHttpInfo
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getGuestCheckoutSessionWithHttpInfo($checkout_session_id, $x_ebay_c_marketplace_id)
{
$request = $this->getGuestCheckoutSessionRequest($checkout_session_id, $x_ebay_c_marketplace_id);
try {
Method initiateGuestCheckoutSessionWithHttpInfo
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function initiateGuestCheckoutSessionWithHttpInfo($x_ebay_c_marketplace_id, $x_ebay_c_enduserctx = null, $create_guest_checkout_session_request_v2 = null)
{
$request = $this->initiateGuestCheckoutSessionRequest($x_ebay_c_marketplace_id, $x_ebay_c_enduserctx, $create_guest_checkout_session_request_v2);
try {
Method updateGuestShippingAddressWithHttpInfo
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function updateGuestShippingAddressWithHttpInfo($checkout_session_id, $x_ebay_c_marketplace_id, $shipping_address_impl = null)
{
$request = $this->updateGuestShippingAddressRequest($checkout_session_id, $x_ebay_c_marketplace_id, $shipping_address_impl);
try {
Method updateGuestShippingOptionWithHttpInfo
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function updateGuestShippingOptionWithHttpInfo($checkout_session_id, $x_ebay_c_marketplace_id, $update_shipping_option = null)
{
$request = $this->updateGuestShippingOptionRequest($checkout_session_id, $x_ebay_c_marketplace_id, $update_shipping_option);
try {
Method applyGuestCouponWithHttpInfo
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function applyGuestCouponWithHttpInfo($checkout_session_id, $x_ebay_c_marketplace_id, $coupon_request = null)
{
$request = $this->applyGuestCouponRequest($checkout_session_id, $x_ebay_c_marketplace_id, $coupon_request);
try {
Function getGuestCheckoutSessionWithHttpInfo
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function getGuestCheckoutSessionWithHttpInfo($checkout_session_id, $x_ebay_c_marketplace_id)
{
$request = $this->getGuestCheckoutSessionRequest($checkout_session_id, $x_ebay_c_marketplace_id);
try {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function initiateGuestCheckoutSessionWithHttpInfo
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function initiateGuestCheckoutSessionWithHttpInfo($x_ebay_c_marketplace_id, $x_ebay_c_enduserctx = null, $create_guest_checkout_session_request_v2 = null)
{
$request = $this->initiateGuestCheckoutSessionRequest($x_ebay_c_marketplace_id, $x_ebay_c_enduserctx, $create_guest_checkout_session_request_v2);
try {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function updateGuestQuantityWithHttpInfo
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function updateGuestQuantityWithHttpInfo($checkout_session_id, $x_ebay_c_marketplace_id, $update_quantity = null)
{
$request = $this->updateGuestQuantityRequest($checkout_session_id, $x_ebay_c_marketplace_id, $update_quantity);
try {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function updateGuestShippingAddressWithHttpInfo
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function updateGuestShippingAddressWithHttpInfo($checkout_session_id, $x_ebay_c_marketplace_id, $shipping_address_impl = null)
{
$request = $this->updateGuestShippingAddressRequest($checkout_session_id, $x_ebay_c_marketplace_id, $shipping_address_impl);
try {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function applyGuestCouponWithHttpInfo
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function applyGuestCouponWithHttpInfo($checkout_session_id, $x_ebay_c_marketplace_id, $coupon_request = null)
{
$request = $this->applyGuestCouponRequest($checkout_session_id, $x_ebay_c_marketplace_id, $coupon_request);
try {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function removeGuestCouponWithHttpInfo
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function removeGuestCouponWithHttpInfo($checkout_session_id, $x_ebay_c_marketplace_id, $coupon_request = null)
{
$request = $this->removeGuestCouponRequest($checkout_session_id, $x_ebay_c_marketplace_id, $coupon_request);
try {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function updateGuestShippingOptionWithHttpInfo
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function updateGuestShippingOptionWithHttpInfo($checkout_session_id, $x_ebay_c_marketplace_id, $update_shipping_option = null)
{
$request = $this->updateGuestShippingOptionRequest($checkout_session_id, $x_ebay_c_marketplace_id, $update_shipping_option);
try {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Similar blocks of code found in 6 locations. Consider refactoring. Open
public function removeGuestCouponRequest($checkout_session_id, $x_ebay_c_marketplace_id, $coupon_request = null)
{
// Verify the required parameter 'checkout_session_id' is set.
if ($checkout_session_id === null || (\is_array($checkout_session_id) && count($checkout_session_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $checkout_session_id when calling removeGuestCoupon');
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 624.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 6 locations. Consider refactoring. Open
public function updateGuestQuantityRequest($checkout_session_id, $x_ebay_c_marketplace_id, $update_quantity = null)
{
// Verify the required parameter 'checkout_session_id' is set.
if ($checkout_session_id === null || (\is_array($checkout_session_id) && count($checkout_session_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $checkout_session_id when calling updateGuestQuantity');
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 624.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 6 locations. Consider refactoring. Open
public function updateGuestShippingAddressRequest($checkout_session_id, $x_ebay_c_marketplace_id, $shipping_address_impl = null)
{
// Verify the required parameter 'checkout_session_id' is set.
if ($checkout_session_id === null || (\is_array($checkout_session_id) && count($checkout_session_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $checkout_session_id when calling updateGuestShippingAddress');
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 624.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 6 locations. Consider refactoring. Open
public function applyGuestCouponRequest($checkout_session_id, $x_ebay_c_marketplace_id, $coupon_request = null)
{
// Verify the required parameter 'checkout_session_id' is set.
if ($checkout_session_id === null || (\is_array($checkout_session_id) && count($checkout_session_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $checkout_session_id when calling applyGuestCoupon');
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 624.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 6 locations. Consider refactoring. Open
public function updateGuestShippingOptionRequest($checkout_session_id, $x_ebay_c_marketplace_id, $update_shipping_option = null)
{
// Verify the required parameter 'checkout_session_id' is set.
if ($checkout_session_id === null || (\is_array($checkout_session_id) && count($checkout_session_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $checkout_session_id when calling updateGuestShippingOption');
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 624.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
public function initiateGuestCheckoutSessionRequest($x_ebay_c_marketplace_id, $x_ebay_c_enduserctx = null, $create_guest_checkout_session_request_v2 = null)
{
// Verify the required parameter 'x_ebay_c_marketplace_id' is set.
if ($x_ebay_c_marketplace_id === null || (\is_array($x_ebay_c_marketplace_id) && count($x_ebay_c_marketplace_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $x_ebay_c_marketplace_id when calling initiateGuestCheckoutSession');
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 572.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 5 locations. Consider refactoring. Open
public function getGuestCheckoutSessionRequest($checkout_session_id, $x_ebay_c_marketplace_id)
{
// Verify the required parameter 'checkout_session_id' is set.
if ($checkout_session_id === null || (\is_array($checkout_session_id) && count($checkout_session_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $checkout_session_id when calling getGuestCheckoutSession');
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 562.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 6 locations. Consider refactoring. Open
public function initiateGuestCheckoutSessionWithHttpInfo($x_ebay_c_marketplace_id, $x_ebay_c_enduserctx = null, $create_guest_checkout_session_request_v2 = null)
{
$request = $this->initiateGuestCheckoutSessionRequest($x_ebay_c_marketplace_id, $x_ebay_c_enduserctx, $create_guest_checkout_session_request_v2);
try {
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 544.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 8 locations. Consider refactoring. Open
public function updateGuestShippingOptionWithHttpInfo($checkout_session_id, $x_ebay_c_marketplace_id, $update_shipping_option = null)
{
$request = $this->updateGuestShippingOptionRequest($checkout_session_id, $x_ebay_c_marketplace_id, $update_shipping_option);
try {
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 539.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 8 locations. Consider refactoring. Open
public function updateGuestQuantityWithHttpInfo($checkout_session_id, $x_ebay_c_marketplace_id, $update_quantity = null)
{
$request = $this->updateGuestQuantityRequest($checkout_session_id, $x_ebay_c_marketplace_id, $update_quantity);
try {
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 539.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 8 locations. Consider refactoring. Open
public function updateGuestShippingAddressWithHttpInfo($checkout_session_id, $x_ebay_c_marketplace_id, $shipping_address_impl = null)
{
$request = $this->updateGuestShippingAddressRequest($checkout_session_id, $x_ebay_c_marketplace_id, $shipping_address_impl);
try {
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 539.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 8 locations. Consider refactoring. Open
public function removeGuestCouponWithHttpInfo($checkout_session_id, $x_ebay_c_marketplace_id, $coupon_request = null)
{
$request = $this->removeGuestCouponRequest($checkout_session_id, $x_ebay_c_marketplace_id, $coupon_request);
try {
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 539.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 8 locations. Consider refactoring. Open
public function applyGuestCouponWithHttpInfo($checkout_session_id, $x_ebay_c_marketplace_id, $coupon_request = null)
{
$request = $this->applyGuestCouponRequest($checkout_session_id, $x_ebay_c_marketplace_id, $coupon_request);
try {
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 539.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 6 locations. Consider refactoring. Open
public function initiateGuestCheckoutSessionAsyncWithHttpInfo($x_ebay_c_marketplace_id, $x_ebay_c_enduserctx = null, $create_guest_checkout_session_request_v2 = null)
{
$returnType = '\TNT\Ebay\Buy\Order\V2\Model\GuestCheckoutSessionResponseV2';
$request = $this->initiateGuestCheckoutSessionRequest($x_ebay_c_marketplace_id, $x_ebay_c_enduserctx, $create_guest_checkout_session_request_v2);
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 248.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 9 locations. Consider refactoring. Open
public function updateGuestQuantityAsyncWithHttpInfo($checkout_session_id, $x_ebay_c_marketplace_id, $update_quantity = null)
{
$returnType = '\TNT\Ebay\Buy\Order\V2\Model\GuestCheckoutSessionResponseV2';
$request = $this->updateGuestQuantityRequest($checkout_session_id, $x_ebay_c_marketplace_id, $update_quantity);
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 243.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 9 locations. Consider refactoring. Open
public function updateGuestShippingAddressAsyncWithHttpInfo($checkout_session_id, $x_ebay_c_marketplace_id, $shipping_address_impl = null)
{
$returnType = '\TNT\Ebay\Buy\Order\V2\Model\GuestCheckoutSessionResponseV2';
$request = $this->updateGuestShippingAddressRequest($checkout_session_id, $x_ebay_c_marketplace_id, $shipping_address_impl);
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 243.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 9 locations. Consider refactoring. Open
public function removeGuestCouponAsyncWithHttpInfo($checkout_session_id, $x_ebay_c_marketplace_id, $coupon_request = null)
{
$returnType = '\TNT\Ebay\Buy\Order\V2\Model\GuestCheckoutSessionResponseV2';
$request = $this->removeGuestCouponRequest($checkout_session_id, $x_ebay_c_marketplace_id, $coupon_request);
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 243.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 9 locations. Consider refactoring. Open
public function applyGuestCouponAsyncWithHttpInfo($checkout_session_id, $x_ebay_c_marketplace_id, $coupon_request = null)
{
$returnType = '\TNT\Ebay\Buy\Order\V2\Model\GuestCheckoutSessionResponseV2';
$request = $this->applyGuestCouponRequest($checkout_session_id, $x_ebay_c_marketplace_id, $coupon_request);
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 243.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 9 locations. Consider refactoring. Open
public function updateGuestShippingOptionAsyncWithHttpInfo($checkout_session_id, $x_ebay_c_marketplace_id, $update_shipping_option = null)
{
$returnType = '\TNT\Ebay\Buy\Order\V2\Model\GuestCheckoutSessionResponseV2';
$request = $this->updateGuestShippingOptionRequest($checkout_session_id, $x_ebay_c_marketplace_id, $update_shipping_option);
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 243.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76