brandon14/ebay-sdk-php

View on GitHub

Showing 3,709 of 3,709 total issues

Identical blocks of code found in 31 locations. Consider refactoring.
Open

<?php

/**
 * This file is part of the trollandtoad/ebay-sdk-php package.
 *
Severity: Major
Found in src/Buy/Feed/V1/ApiException.php and 30 other locations - About 3 hrs to fix
src/Buy/Browse/V1/ApiException.php on lines 1..154
src/Buy/Deal/V1/ApiException.php on lines 1..154
src/Buy/FeedBeta/V1/ApiException.php on lines 1..154
src/Buy/MarketingBeta/V1/ApiException.php on lines 1..154
src/Buy/MarketplaceInsightsBeta/V1/ApiException.php on lines 1..154
src/Buy/OfferBeta/V1/ApiException.php on lines 1..154
src/Buy/Order/V2/ApiException.php on lines 1..154
src/Commerce/CatalogBeta/V1/ApiException.php on lines 1..154
src/Commerce/Charity/V1/ApiException.php on lines 1..154
src/Commerce/MediaBeta/V1/ApiException.php on lines 1..154
src/Commerce/Notification/V1/ApiException.php on lines 1..154
src/Commerce/Taxonomy/V1/ApiException.php on lines 1..154
src/Commerce/TranslationBeta/V1/ApiException.php on lines 1..154
src/Developer/AnalyticsBeta/V1/ApiException.php on lines 1..154
src/Developer/ClientRegistration/V1/ApiException.php on lines 1..154
src/Developer/KeyManagement/V1/ApiException.php on lines 1..154
src/Sell/Account/V1/ApiException.php on lines 1..154
src/Sell/Account/V2/ApiException.php on lines 1..154
src/Sell/Analytics/V1/ApiException.php on lines 1..154
src/Sell/Compliance/V1/ApiException.php on lines 1..154
src/Sell/Feed/V1/ApiException.php on lines 1..154
src/Sell/Finances/V1/ApiException.php on lines 1..154
src/Sell/Fulfillment/V1/ApiException.php on lines 1..154
src/Sell/Inventory/V1/ApiException.php on lines 1..154
src/Sell/ListingBeta/V1/ApiException.php on lines 1..154
src/Sell/Logistics/V1/ApiException.php on lines 1..154
src/Sell/Marketing/V1/ApiException.php on lines 1..154
src/Sell/Metadata/V1/ApiException.php on lines 1..154
src/Sell/Negotiation/V1/ApiException.php on lines 1..154
src/Sell/Recommendation/V1/ApiException.php on lines 1..154

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 152.

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

Further Reading

Identical blocks of code found in 31 locations. Consider refactoring.
Open

<?php

/**
 * This file is part of the trollandtoad/ebay-sdk-php package.
 *
Severity: Major
Found in src/Developer/KeyManagement/V1/ApiException.php and 30 other locations - About 3 hrs to fix
src/Buy/Browse/V1/ApiException.php on lines 1..154
src/Buy/Deal/V1/ApiException.php on lines 1..154
src/Buy/Feed/V1/ApiException.php on lines 1..154
src/Buy/FeedBeta/V1/ApiException.php on lines 1..154
src/Buy/MarketingBeta/V1/ApiException.php on lines 1..154
src/Buy/MarketplaceInsightsBeta/V1/ApiException.php on lines 1..154
src/Buy/OfferBeta/V1/ApiException.php on lines 1..154
src/Buy/Order/V2/ApiException.php on lines 1..154
src/Commerce/CatalogBeta/V1/ApiException.php on lines 1..154
src/Commerce/Charity/V1/ApiException.php on lines 1..154
src/Commerce/MediaBeta/V1/ApiException.php on lines 1..154
src/Commerce/Notification/V1/ApiException.php on lines 1..154
src/Commerce/Taxonomy/V1/ApiException.php on lines 1..154
src/Commerce/TranslationBeta/V1/ApiException.php on lines 1..154
src/Developer/AnalyticsBeta/V1/ApiException.php on lines 1..154
src/Developer/ClientRegistration/V1/ApiException.php on lines 1..154
src/Sell/Account/V1/ApiException.php on lines 1..154
src/Sell/Account/V2/ApiException.php on lines 1..154
src/Sell/Analytics/V1/ApiException.php on lines 1..154
src/Sell/Compliance/V1/ApiException.php on lines 1..154
src/Sell/Feed/V1/ApiException.php on lines 1..154
src/Sell/Finances/V1/ApiException.php on lines 1..154
src/Sell/Fulfillment/V1/ApiException.php on lines 1..154
src/Sell/Inventory/V1/ApiException.php on lines 1..154
src/Sell/ListingBeta/V1/ApiException.php on lines 1..154
src/Sell/Logistics/V1/ApiException.php on lines 1..154
src/Sell/Marketing/V1/ApiException.php on lines 1..154
src/Sell/Metadata/V1/ApiException.php on lines 1..154
src/Sell/Negotiation/V1/ApiException.php on lines 1..154
src/Sell/Recommendation/V1/ApiException.php on lines 1..154

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 152.

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

Further Reading

Identical blocks of code found in 31 locations. Consider refactoring.
Open

<?php

/**
 * This file is part of the trollandtoad/ebay-sdk-php package.
 *
Severity: Major
Found in src/Commerce/CatalogBeta/V1/ApiException.php and 30 other locations - About 3 hrs to fix
src/Buy/Browse/V1/ApiException.php on lines 1..154
src/Buy/Deal/V1/ApiException.php on lines 1..154
src/Buy/Feed/V1/ApiException.php on lines 1..154
src/Buy/FeedBeta/V1/ApiException.php on lines 1..154
src/Buy/MarketingBeta/V1/ApiException.php on lines 1..154
src/Buy/MarketplaceInsightsBeta/V1/ApiException.php on lines 1..154
src/Buy/OfferBeta/V1/ApiException.php on lines 1..154
src/Buy/Order/V2/ApiException.php on lines 1..154
src/Commerce/Charity/V1/ApiException.php on lines 1..154
src/Commerce/MediaBeta/V1/ApiException.php on lines 1..154
src/Commerce/Notification/V1/ApiException.php on lines 1..154
src/Commerce/Taxonomy/V1/ApiException.php on lines 1..154
src/Commerce/TranslationBeta/V1/ApiException.php on lines 1..154
src/Developer/AnalyticsBeta/V1/ApiException.php on lines 1..154
src/Developer/ClientRegistration/V1/ApiException.php on lines 1..154
src/Developer/KeyManagement/V1/ApiException.php on lines 1..154
src/Sell/Account/V1/ApiException.php on lines 1..154
src/Sell/Account/V2/ApiException.php on lines 1..154
src/Sell/Analytics/V1/ApiException.php on lines 1..154
src/Sell/Compliance/V1/ApiException.php on lines 1..154
src/Sell/Feed/V1/ApiException.php on lines 1..154
src/Sell/Finances/V1/ApiException.php on lines 1..154
src/Sell/Fulfillment/V1/ApiException.php on lines 1..154
src/Sell/Inventory/V1/ApiException.php on lines 1..154
src/Sell/ListingBeta/V1/ApiException.php on lines 1..154
src/Sell/Logistics/V1/ApiException.php on lines 1..154
src/Sell/Marketing/V1/ApiException.php on lines 1..154
src/Sell/Metadata/V1/ApiException.php on lines 1..154
src/Sell/Negotiation/V1/ApiException.php on lines 1..154
src/Sell/Recommendation/V1/ApiException.php on lines 1..154

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 152.

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

Further Reading

Identical blocks of code found in 31 locations. Consider refactoring.
Open

<?php

/**
 * This file is part of the trollandtoad/ebay-sdk-php package.
 *
Severity: Major
Found in src/Buy/FeedBeta/V1/ApiException.php and 30 other locations - About 3 hrs to fix
src/Buy/Browse/V1/ApiException.php on lines 1..154
src/Buy/Deal/V1/ApiException.php on lines 1..154
src/Buy/Feed/V1/ApiException.php on lines 1..154
src/Buy/MarketingBeta/V1/ApiException.php on lines 1..154
src/Buy/MarketplaceInsightsBeta/V1/ApiException.php on lines 1..154
src/Buy/OfferBeta/V1/ApiException.php on lines 1..154
src/Buy/Order/V2/ApiException.php on lines 1..154
src/Commerce/CatalogBeta/V1/ApiException.php on lines 1..154
src/Commerce/Charity/V1/ApiException.php on lines 1..154
src/Commerce/MediaBeta/V1/ApiException.php on lines 1..154
src/Commerce/Notification/V1/ApiException.php on lines 1..154
src/Commerce/Taxonomy/V1/ApiException.php on lines 1..154
src/Commerce/TranslationBeta/V1/ApiException.php on lines 1..154
src/Developer/AnalyticsBeta/V1/ApiException.php on lines 1..154
src/Developer/ClientRegistration/V1/ApiException.php on lines 1..154
src/Developer/KeyManagement/V1/ApiException.php on lines 1..154
src/Sell/Account/V1/ApiException.php on lines 1..154
src/Sell/Account/V2/ApiException.php on lines 1..154
src/Sell/Analytics/V1/ApiException.php on lines 1..154
src/Sell/Compliance/V1/ApiException.php on lines 1..154
src/Sell/Feed/V1/ApiException.php on lines 1..154
src/Sell/Finances/V1/ApiException.php on lines 1..154
src/Sell/Fulfillment/V1/ApiException.php on lines 1..154
src/Sell/Inventory/V1/ApiException.php on lines 1..154
src/Sell/ListingBeta/V1/ApiException.php on lines 1..154
src/Sell/Logistics/V1/ApiException.php on lines 1..154
src/Sell/Marketing/V1/ApiException.php on lines 1..154
src/Sell/Metadata/V1/ApiException.php on lines 1..154
src/Sell/Negotiation/V1/ApiException.php on lines 1..154
src/Sell/Recommendation/V1/ApiException.php on lines 1..154

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 152.

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

Further Reading

Identical blocks of code found in 31 locations. Consider refactoring.
Open

<?php

/**
 * This file is part of the trollandtoad/ebay-sdk-php package.
 *
Severity: Major
Found in src/Sell/Fulfillment/V1/ApiException.php and 30 other locations - About 3 hrs to fix
src/Buy/Browse/V1/ApiException.php on lines 1..154
src/Buy/Deal/V1/ApiException.php on lines 1..154
src/Buy/Feed/V1/ApiException.php on lines 1..154
src/Buy/FeedBeta/V1/ApiException.php on lines 1..154
src/Buy/MarketingBeta/V1/ApiException.php on lines 1..154
src/Buy/MarketplaceInsightsBeta/V1/ApiException.php on lines 1..154
src/Buy/OfferBeta/V1/ApiException.php on lines 1..154
src/Buy/Order/V2/ApiException.php on lines 1..154
src/Commerce/CatalogBeta/V1/ApiException.php on lines 1..154
src/Commerce/Charity/V1/ApiException.php on lines 1..154
src/Commerce/MediaBeta/V1/ApiException.php on lines 1..154
src/Commerce/Notification/V1/ApiException.php on lines 1..154
src/Commerce/Taxonomy/V1/ApiException.php on lines 1..154
src/Commerce/TranslationBeta/V1/ApiException.php on lines 1..154
src/Developer/AnalyticsBeta/V1/ApiException.php on lines 1..154
src/Developer/ClientRegistration/V1/ApiException.php on lines 1..154
src/Developer/KeyManagement/V1/ApiException.php on lines 1..154
src/Sell/Account/V1/ApiException.php on lines 1..154
src/Sell/Account/V2/ApiException.php on lines 1..154
src/Sell/Analytics/V1/ApiException.php on lines 1..154
src/Sell/Compliance/V1/ApiException.php on lines 1..154
src/Sell/Feed/V1/ApiException.php on lines 1..154
src/Sell/Finances/V1/ApiException.php on lines 1..154
src/Sell/Inventory/V1/ApiException.php on lines 1..154
src/Sell/ListingBeta/V1/ApiException.php on lines 1..154
src/Sell/Logistics/V1/ApiException.php on lines 1..154
src/Sell/Marketing/V1/ApiException.php on lines 1..154
src/Sell/Metadata/V1/ApiException.php on lines 1..154
src/Sell/Negotiation/V1/ApiException.php on lines 1..154
src/Sell/Recommendation/V1/ApiException.php on lines 1..154

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 152.

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

Further Reading

Method __construct has 87 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function __construct(array $data = null)
    {
        $this->container['item_id'] = $data['item_id'] ?? null;
        $this->container['title'] = $data['title'] ?? null;
        $this->container['image_url'] = $data['image_url'] ?? null;
Severity: Major
Found in src/Buy/FeedBeta/V1/Model/Item.php - About 3 hrs to fix

    Method getAdsByInventoryReferenceRequest has 87 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function getAdsByInventoryReferenceRequest($campaign_id, $inventory_reference_id, $inventory_reference_type)
        {
            // Verify the required parameter 'campaign_id' is set.
            if ($campaign_id === null || (\is_array($campaign_id) && count($campaign_id) === 0)) {
                throw new \InvalidArgumentException('Missing the required parameter $campaign_id when calling getAdsByInventoryReference');
    Severity: Major
    Found in src/Sell/Marketing/V1/Api/AdApi.php - About 3 hrs to fix

      Method findListingRecommendationsRequest has 87 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function findListingRecommendationsRequest($x_ebay_c_marketplace_id, $filter = null, $limit = null, $offset = null, $find_listing_recommendation_request = 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 findListingRecommendations');
      Severity: Major
      Found in src/Sell/Recommendation/V1/Api/ListingRecommendationApi.php - About 3 hrs to fix

        Method suggestBidsRequest has 86 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function suggestBidsRequest($ad_group_id, $campaign_id, $targeted_bid_request)
            {
                // Verify the required parameter 'ad_group_id' is set.
                if ($ad_group_id === null || (\is_array($ad_group_id) && count($ad_group_id) === 0)) {
                    throw new \InvalidArgumentException('Missing the required parameter $ad_group_id when calling suggestBids');
        Severity: Major
        Found in src/Sell/Marketing/V1/Api/AdGroupApi.php - About 3 hrs to fix

          Method updateKeywordRequest has 86 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function updateKeywordRequest($campaign_id, $keyword_id, $update_keyword_request)
              {
                  // Verify the required parameter 'campaign_id' is set.
                  if ($campaign_id === null || (\is_array($campaign_id) && count($campaign_id) === 0)) {
                      throw new \InvalidArgumentException('Missing the required parameter $campaign_id when calling updateKeyword');
          Severity: Major
          Found in src/Sell/Marketing/V1/Api/KeywordApi.php - About 3 hrs to fix

            Method updateAdGroupRequest has 86 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function updateAdGroupRequest($ad_group_id, $campaign_id, $update_ad_group_request)
                {
                    // Verify the required parameter 'ad_group_id' is set.
                    if ($ad_group_id === null || (\is_array($ad_group_id) && count($ad_group_id) === 0)) {
                        throw new \InvalidArgumentException('Missing the required parameter $ad_group_id when calling updateAdGroup');
            Severity: Major
            Found in src/Sell/Marketing/V1/Api/AdGroupApi.php - About 3 hrs to fix

              Method updateBidRequest has 86 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function updateBidRequest($ad_id, $campaign_id, $update_bid_percentage_request)
                  {
                      // Verify the required parameter 'ad_id' is set.
                      if ($ad_id === null || (\is_array($ad_id) && count($ad_id) === 0)) {
                          throw new \InvalidArgumentException('Missing the required parameter $ad_id when calling updateBid');
              Severity: Major
              Found in src/Sell/Marketing/V1/Api/AdApi.php - About 3 hrs to fix

                Method createOrReplaceSalesTaxRequest has 86 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function createOrReplaceSalesTaxRequest($country_code, $jurisdiction_id, $sales_tax_base)
                    {
                        // Verify the required parameter 'country_code' is set.
                        if ($country_code === null || (\is_array($country_code) && count($country_code) === 0)) {
                            throw new \InvalidArgumentException('Missing the required parameter $country_code when calling createOrReplaceSalesTax');
                Severity: Major
                Found in src/Sell/Account/V1/Api/SalesTaxApi.php - About 3 hrs to fix

                  Function getEventRequest has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function getEventRequest($x_ebay_c_marketplace_id, $event_id)
                      {
                          // 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 getEvent');
                  Severity: Minor
                  Found in src/Buy/Deal/V1/Api/EventApi.php - About 3 hrs to fix

                  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');
                  Severity: Minor
                  Found in src/Buy/Order/V2/Api/GuestCheckoutSessionApi.php - About 3 hrs to fix

                  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 getFileRequest has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function getFileRequest($file_id, $x_ebay_c_marketplace_id)
                      {
                          // Verify the required parameter 'file_id' is set.
                          if ($file_id === null || (\is_array($file_id) && count($file_id) === 0)) {
                              throw new \InvalidArgumentException('Missing the required parameter $file_id when calling getFile');
                  Severity: Minor
                  Found in src/Buy/Feed/V1/Api/FileApi.php - About 3 hrs to fix

                  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 getBiddingRequest has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function getBiddingRequest($item_id, $x_ebay_c_marketplace_id)
                      {
                          // Verify the required parameter 'item_id' is set.
                          if ($item_id === null || (\is_array($item_id) && count($item_id) === 0)) {
                              throw new \InvalidArgumentException('Missing the required parameter $item_id when calling getBidding');
                  Severity: Minor
                  Found in src/Buy/OfferBeta/V1/Api/BiddingApi.php - About 3 hrs to fix

                  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 getSellerStandardsProfileRequest has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function getSellerStandardsProfileRequest($cycle, $program)
                      {
                          // Verify the required parameter 'cycle' is set.
                          if ($cycle === null || (\is_array($cycle) && count($cycle) === 0)) {
                              throw new \InvalidArgumentException('Missing the required parameter $cycle when calling getSellerStandardsProfile');
                  Severity: Minor
                  Found in src/Sell/Analytics/V1/Api/SellerStandardsProfileApi.php - About 3 hrs to fix

                  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 createNegativeKeywordRequest has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function createNegativeKeywordRequest($create_negative_keyword_request)
                      {
                          // Verify the required parameter 'create_negative_keyword_request' is set.
                          if ($create_negative_keyword_request === null || (\is_array($create_negative_keyword_request) && count($create_negative_keyword_request) === 0)) {
                              throw new \InvalidArgumentException('Missing the required parameter $create_negative_keyword_request when calling createNegativeKeyword');
                  Severity: Minor
                  Found in src/Sell/Marketing/V1/Api/NegativeKeywordApi.php - About 3 hrs to fix

                  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 bulkUpdateNegativeKeywordRequest has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function bulkUpdateNegativeKeywordRequest($bulk_update_negative_keyword_request)
                      {
                          // Verify the required parameter 'bulk_update_negative_keyword_request' is set.
                          if ($bulk_update_negative_keyword_request === null || (\is_array($bulk_update_negative_keyword_request) && count($bulk_update_negative_keyword_request) === 0)) {
                              throw new \InvalidArgumentException('Missing the required parameter $bulk_update_negative_keyword_request when calling bulkUpdateNegativeKeyword');
                  Severity: Minor
                  Found in src/Sell/Marketing/V1/Api/NegativeKeywordApi.php - About 3 hrs to fix

                  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

                  Severity
                  Category
                  Status
                  Source
                  Language