brandon14/ebay-sdk-php

View on GitHub

Showing 3,709 of 3,709 total issues

Function updateFulfillmentPolicyRequest has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
Open

    public function updateFulfillmentPolicyRequest($fulfillment_policy_id, $fulfillment_policy_request)
    {
        // Verify the required parameter 'fulfillment_policy_id' is set.
        if ($fulfillment_policy_id === null || (\is_array($fulfillment_policy_id) && count($fulfillment_policy_id) === 0)) {
            throw new \InvalidArgumentException('Missing the required parameter $fulfillment_policy_id when calling updateFulfillmentPolicy');
Severity: Minor
Found in src/Sell/Account/V1/Api/FulfillmentPolicyApi.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 fetchEvidenceContentRequest has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
Open

    public function fetchEvidenceContentRequest($payment_dispute_id, $evidence_id, $file_id)
    {
        // Verify the required parameter 'payment_dispute_id' is set.
        if ($payment_dispute_id === null || (\is_array($payment_dispute_id) && count($payment_dispute_id) === 0)) {
            throw new \InvalidArgumentException('Missing the required parameter $payment_dispute_id when calling fetchEvidenceContent');
Severity: Minor
Found in src/Sell/Fulfillment/V1/Api/PaymentDisputeApi.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 getFilesRequest has 102 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function getFilesRequest($x_ebay_c_marketplace_id, $category_ids = null, $continuation_token = null, $feed_scope = null, $feed_type_id = null, $limit = null, $look_back = 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 getFiles');
Severity: Major
Found in src/Buy/Feed/V1/Api/FileApi.php - About 4 hrs to fix

    Method getAdsRequest has 102 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function getAdsRequest($campaign_id, $ad_group_ids = null, $ad_status = null, $limit = null, $listing_ids = null, $offset = null)
        {
            // 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 getAds');
    Severity: Major
    Found in src/Sell/Marketing/V1/Api/AdApi.php - About 4 hrs to fix

      Method getPromotionReportsRequest has 102 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function getPromotionReportsRequest($marketplace_id, $limit = null, $offset = null, $promotion_status = null, $promotion_type = null, $q = null)
          {
              // Verify the required parameter 'marketplace_id' is set.
              if ($marketplace_id === null || (\is_array($marketplace_id) && count($marketplace_id) === 0)) {
                  throw new \InvalidArgumentException('Missing the required parameter $marketplace_id when calling getPromotionReports');
      Severity: Major
      Found in src/Sell/Marketing/V1/Api/PromotionReportApi.php - About 4 hrs to fix

        Method getListingSetRequest has 102 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function getListingSetRequest($promotion_id, $limit = null, $offset = null, $q = null, $sort = null, $status = null)
            {
                // Verify the required parameter 'promotion_id' is set.
                if ($promotion_id === null || (\is_array($promotion_id) && count($promotion_id) === 0)) {
                    throw new \InvalidArgumentException('Missing the required parameter $promotion_id when calling getListingSet');
        Severity: Major
        Found in src/Sell/Marketing/V1/Api/PromotionApi.php - About 4 hrs to fix

          LegalAddress has 32 functions (exceeds 20 allowed). Consider refactoring.
          Open

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

            ItemReturnTerms has 32 functions (exceeds 20 allowed). Consider refactoring.
            Open

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

              CartItem has 32 functions (exceeds 20 allowed). Consider refactoring.
              Open

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

                SalesHistoryPagedCollection has 32 functions (exceeds 20 allowed). Consider refactoring.
                Open

                class SalesHistoryPagedCollection implements ModelInterface, \ArrayAccess, \JsonSerializable
                {
                    public const DISCRIMINATOR = null;
                
                    /**

                  MerchandisedProduct has 32 functions (exceeds 20 allowed). Consider refactoring.
                  Open

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

                    GuestPurchaseOrderV2 has 32 functions (exceeds 20 allowed). Consider refactoring.
                    Open

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

                      Charge has 32 functions (exceeds 20 allowed). Consider refactoring.
                      Open

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

                        NegativeKeywordResponse has 32 functions (exceeds 20 allowed). Consider refactoring.
                        Open

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

                          ItemsPagedCollection has 32 functions (exceeds 20 allowed). Consider refactoring.
                          Open

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

                            Ad has 32 functions (exceeds 20 allowed). Consider refactoring.
                            Open

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

                              ServiceMetricsTask has 32 functions (exceeds 20 allowed). Consider refactoring.
                              Open

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

                                Task has 32 functions (exceeds 20 allowed). Consider refactoring.
                                Open

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

                                  ListingPolicies has 32 functions (exceeds 20 allowed). Consider refactoring.
                                  Open

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

                                    InventoryItemWithSkuLocaleGroupKeys has 32 functions (exceeds 20 allowed). Consider refactoring.
                                    Open

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