brandon14/ebay-sdk-php

View on GitHub

Showing 2,539 of 3,709 total issues

Function getItemSnapshotFeedRequest has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
Open

    public function getItemSnapshotFeedRequest($accept, $x_ebay_c_marketplace_id, $range, $category_id, $snapshot_date)
    {
        // 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 getItemSnapshotFeed');
Severity: Minor
Found in src/Buy/FeedBeta/V1/Api/ItemSnapshotApi.php - About 5 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 getItemFeedRequest has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
Open

    public function getItemFeedRequest($accept, $x_ebay_c_marketplace_id, $range, $feed_scope, $category_id, $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 getItemFeed');
Severity: Minor
Found in src/Buy/FeedBeta/V1/Api/ItemApi.php - About 5 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

File EventItem.php has 378 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

/**
 * This file is part of the trollandtoad/ebay-sdk-php package.
 *
Severity: Minor
Found in src/Buy/Deal/V1/Model/EventItem.php - About 5 hrs to fix

    File Transaction.php has 378 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    
    /**
     * This file is part of the trollandtoad/ebay-sdk-php package.
     *
    Severity: Minor
    Found in src/Sell/Finances/V1/Model/Transaction.php - About 5 hrs to fix

      File AdReportMetadataApi.php has 378 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      
      /**
       * This file is part of the trollandtoad/ebay-sdk-php package.
       *
      Severity: Minor
      Found in src/Sell/Marketing/V1/Api/AdReportMetadataApi.php - About 5 hrs to fix

        File PaymentDispute.php has 378 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        <?php
        
        /**
         * This file is part of the trollandtoad/ebay-sdk-php package.
         *
        Severity: Minor
        Found in src/Sell/Fulfillment/V1/Model/PaymentDispute.php - About 5 hrs to fix

          SellerLegalInfo has 38 functions (exceeds 20 allowed). Consider refactoring.
          Open

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

            FileMetadata has 38 functions (exceeds 20 allowed). Consider refactoring.
            Open

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

              PricingSummary has 38 functions (exceeds 20 allowed). Consider refactoring.
              Open

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

                FulfillmentPolicyRequest has 38 functions (exceeds 20 allowed). Consider refactoring.
                Open

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

                  ShippingService has 38 functions (exceeds 20 allowed). Consider refactoring.
                  Open

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

                    InventoryLocationResponse has 38 functions (exceeds 20 allowed). Consider refactoring.
                    Open

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

                      SetPaymentPolicyResponse has 38 functions (exceeds 20 allowed). Consider refactoring.
                      Open

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

                        InventoryLocationResponse has 38 functions (exceeds 20 allowed). Consider refactoring.
                        Open

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

                          Video has 38 functions (exceeds 20 allowed). Consider refactoring.
                          Open

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

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

                                public function searchRequest($aspect_filter = null, $category_ids = null, $epid = null, $fieldgroups = null, $filter = null, $gtin = null, $limit = null, $offset = null, $q = null, $sort = null)
                                {
                                    $resourcePath = '/item_sales/search';
                                    $formParams = [];
                                    $queryParams = [];
                            Severity: Major
                            Found in src/Buy/MarketplaceInsightsBeta/V1/Api/ItemSalesApi.php - About 4 hrs to fix

                              File ListingViolationApi.php has 371 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              <?php
                              
                              /**
                               * This file is part of the trollandtoad/ebay-sdk-php package.
                               *
                              Severity: Minor
                              Found in src/Sell/Compliance/V1/Api/ListingViolationApi.php - About 4 hrs to fix

                                Method searchByImageRequest has 119 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function searchByImageRequest($aspect_filter = null, $category_ids = null, $charity_ids = null, $fieldgroups = null, $filter = null, $limit = null, $offset = null, $sort = null, $search_by_image_request = null)
                                    {
                                        $resourcePath = '/item_summary/search_by_image';
                                        $formParams = [];
                                        $queryParams = [];
                                Severity: Major
                                Found in src/Buy/Browse/V1/Api/SearchByImageApi.php - About 4 hrs to fix

                                  Function updateBidRequest has a Cognitive Complexity of 32 (exceeds 5 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: Minor
                                  Found in src/Sell/Marketing/V1/Api/AdApi.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 suggestBidsRequest has a Cognitive Complexity of 32 (exceeds 5 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: 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

                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language