brandon14/ebay-sdk-php

View on GitHub

Showing 2,539 of 3,709 total issues

Function updateKeywordRequest has a Cognitive Complexity of 32 (exceeds 5 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: Minor
Found in src/Sell/Marketing/V1/Api/KeywordApi.php - About 4 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 updateAdGroupRequest has a Cognitive Complexity of 32 (exceeds 5 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: Minor
Found in src/Sell/Marketing/V1/Api/AdGroupApi.php - About 4 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 createOrReplaceSalesTaxRequest has a Cognitive Complexity of 32 (exceeds 5 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: Minor
Found in src/Sell/Account/V1/Api/SalesTaxApi.php - About 4 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 updateCustomPolicyRequest has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
Open

    public function updateCustomPolicyRequest($custom_policy_id, $x_ebay_c_marketplace_id, $custom_policy_request)
    {
        // Verify the required parameter 'custom_policy_id' is set.
        if ($custom_policy_id === null || (\is_array($custom_policy_id) && count($custom_policy_id) === 0)) {
            throw new \InvalidArgumentException('Missing the required parameter $custom_policy_id when calling updateCustomPolicy');
Severity: Minor
Found in src/Sell/Account/V1/Api/CustomPolicyApi.php - About 4 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

SearchPagedCollection has 36 functions (exceeds 20 allowed). Consider refactoring.
Open

class SearchPagedCollection implements ModelInterface, \ArrayAccess, \JsonSerializable
{
    public const DISCRIMINATOR = null;

    /**
Severity: Minor
Found in src/Buy/Browse/V1/Model/SearchPagedCollection.php - About 4 hrs to fix

    Event has 36 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class Event implements ModelInterface, \ArrayAccess, \JsonSerializable
    {
        public const DISCRIMINATOR = null;
    
        /**
    Severity: Minor
    Found in src/Buy/Deal/V1/Model/Event.php - About 4 hrs to fix

      PricingSummaryV2 has 36 functions (exceeds 20 allowed). Consider refactoring.
      Open

      class PricingSummaryV2 implements ModelInterface, \ArrayAccess, \JsonSerializable
      {
          public const DISCRIMINATOR = null;
      
          /**
      Severity: Minor
      Found in src/Buy/Order/V2/Model/PricingSummaryV2.php - About 4 hrs to fix

        Campaign has 36 functions (exceeds 20 allowed). Consider refactoring.
        Open

        class Campaign implements ModelInterface, \ArrayAccess, \JsonSerializable
        {
            public const DISCRIMINATOR = null;
        
            /**
        Severity: Minor
        Found in src/Sell/Marketing/V1/Model/Campaign.php - About 4 hrs to fix

          PaymentPolicy has 36 functions (exceeds 20 allowed). Consider refactoring.
          Open

          class PaymentPolicy implements ModelInterface, \ArrayAccess, \JsonSerializable
          {
              public const DISCRIMINATOR = null;
          
              /**
          Severity: Minor
          Found in src/Sell/Account/V1/Model/PaymentPolicy.php - About 4 hrs to fix

            InventoryLocationFull has 36 functions (exceeds 20 allowed). Consider refactoring.
            Open

            class InventoryLocationFull implements ModelInterface, \ArrayAccess, \JsonSerializable
            {
                public const DISCRIMINATOR = null;
            
                /**
            Severity: Minor
            Found in src/Sell/Account/V1/Model/InventoryLocationFull.php - About 4 hrs to fix

              InventoryLocationFull has 36 functions (exceeds 20 allowed). Consider refactoring.
              Open

              class InventoryLocationFull implements ModelInterface, \ArrayAccess, \JsonSerializable
              {
                  public const DISCRIMINATOR = null;
              
                  /**
              Severity: Minor
              Found in src/Sell/Inventory/V1/Model/InventoryLocationFull.php - About 4 hrs to fix

                AspectConstraint has 36 functions (exceeds 20 allowed). Consider refactoring.
                Open

                class AspectConstraint implements ModelInterface, \ArrayAccess, \JsonSerializable
                {
                    public const DISCRIMINATOR = null;
                
                    /**
                Severity: Minor
                Found in src/Commerce/Taxonomy/V1/Model/AspectConstraint.php - About 4 hrs to fix

                  Function getItemGroupFeedRequest has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function getItemGroupFeedRequest($accept, $x_ebay_c_marketplace_id, $feed_scope, $category_id, $range = null, $date = null)
                      {
                          // Verify the required parameter 'accept' is set.
                          if ($accept === null || (\is_array($accept) && count($accept) === 0)) {
                              throw new \InvalidArgumentException('Missing the required parameter $accept when calling getItemGroupFeed');
                  Severity: Minor
                  Found in src/Buy/FeedBeta/V1/Api/ItemGroupApi.php - About 4 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 createOrReplaceInventoryItemGroupRequest has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function createOrReplaceInventoryItemGroupRequest($content_language, $inventory_item_group_key, $inventory_item_group)
                      {
                          // Verify the required parameter 'content_language' is set.
                          if ($content_language === null || (\is_array($content_language) && count($content_language) === 0)) {
                              throw new \InvalidArgumentException('Missing the required parameter $content_language when calling createOrReplaceInventoryItemGroup');
                  Severity: Minor
                  Found in src/Sell/Inventory/V1/Api/InventoryItemGroupApi.php - About 4 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 createOrReplaceProductCompatibilityRequest has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function createOrReplaceProductCompatibilityRequest($content_language, $sku, $compatibility)
                      {
                          // Verify the required parameter 'content_language' is set.
                          if ($content_language === null || (\is_array($content_language) && count($content_language) === 0)) {
                              throw new \InvalidArgumentException('Missing the required parameter $content_language when calling createOrReplaceProductCompatibility');
                  Severity: Minor
                  Found in src/Sell/Inventory/V1/Api/ProductCompatibilityApi.php - About 4 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 updateOfferRequest has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function updateOfferRequest($content_language, $offer_id, $ebay_offer_details_with_id)
                      {
                          // Verify the required parameter 'content_language' is set.
                          if ($content_language === null || (\is_array($content_language) && count($content_language) === 0)) {
                              throw new \InvalidArgumentException('Missing the required parameter $content_language when calling updateOffer');
                  Severity: Minor
                  Found in src/Sell/Inventory/V1/Api/OfferApi.php - About 4 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 createOrReplaceInventoryItemRequest has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function createOrReplaceInventoryItemRequest($content_language, $sku, $inventory_item)
                      {
                          // Verify the required parameter 'content_language' is set.
                          if ($content_language === null || (\is_array($content_language) && count($content_language) === 0)) {
                              throw new \InvalidArgumentException('Missing the required parameter $content_language when calling createOrReplaceInventoryItem');
                  Severity: Minor
                  Found in src/Sell/Inventory/V1/Api/InventoryItemApi.php - About 4 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

                  Method searchRequest has 113 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function searchRequest($x_ebay_c_marketplace_id = null, $aspect_filter = null, $category_ids = null, $fieldgroups = null, $gtin = null, $limit = null, $mpn = null, $offset = null, $q = null)
                      {
                          $resourcePath = '/product_summary/search';
                          $formParams = [];
                          $queryParams = [];
                  Severity: Major
                  Found in src/Commerce/CatalogBeta/V1/Api/ProductSummaryApi.php - About 4 hrs to fix

                    MarketplaceApi has 35 functions (exceeds 20 allowed). Consider refactoring.
                    Open

                    class MarketplaceApi
                    {
                        /**
                         * @var ClientInterface
                         */
                    Severity: Minor
                    Found in src/Sell/Metadata/V1/Api/MarketplaceApi.php - About 4 hrs to fix

                      AdGroupApi has 35 functions (exceeds 20 allowed). Consider refactoring.
                      Open

                      class AdGroupApi
                      {
                          /**
                           * @var ClientInterface
                           */
                      Severity: Minor
                      Found in src/Sell/Marketing/V1/Api/AdGroupApi.php - About 4 hrs to fix
                        Severity
                        Category
                        Status
                        Source
                        Language