brandon14/ebay-sdk-php

View on GitHub

Showing 3,709 of 3,709 total issues

File ItemSales.php has 423 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/MarketplaceInsightsBeta/V1/Model/ItemSales.php - About 6 hrs to fix

    Rate has 44 functions (exceeds 20 allowed). Consider refactoring.
    Open

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

      ItemPromotion has 44 functions (exceeds 20 allowed). Consider refactoring.
      Open

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

        ReturnPolicy has 44 functions (exceeds 20 allowed). Consider refactoring.
        Open

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

          UserScheduleResponse has 44 functions (exceeds 20 allowed). Consider refactoring.
          Open

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

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

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

              File ReportTask.php has 408 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/Model/ReportTask.php - About 5 hrs to fix

                File TransactionApi.php has 403 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/Api/TransactionApi.php - About 5 hrs to fix

                  LineItem has 42 functions (exceeds 20 allowed). Consider refactoring.
                  Open

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

                    Shipment has 42 functions (exceeds 20 allowed). Consider refactoring.
                    Open

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

                      ReturnPolicyRequest has 42 functions (exceeds 20 allowed). Consider refactoring.
                      Open

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

                        SetFulfillmentPolicyResponse has 42 functions (exceeds 20 allowed). Consider refactoring.
                        Open

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

                          ProductSummary has 42 functions (exceeds 20 allowed). Consider refactoring.
                          Open

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

                            File BiddingApi.php has 400 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/OfferBeta/V1/Api/BiddingApi.php - About 5 hrs to fix

                              File FeedTypeApi.php has 400 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/Feed/V1/Api/FeedTypeApi.php - About 5 hrs to fix

                                File EventApi.php has 398 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/Api/EventApi.php - About 5 hrs to fix

                                  File OfferApi.php has 394 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/Negotiation/V1/Api/OfferApi.php - About 5 hrs to fix

                                    File EbayOfferDetailsWithKeys.php has 393 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/Inventory/V1/Model/EbayOfferDetailsWithKeys.php - About 5 hrs to fix

                                      File Order.php has 393 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/Order.php - About 5 hrs to fix

                                        Function sanitizeForSerialization has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
                                        Open

                                            public static function sanitizeForSerialization($data, $type = null, $format = null)
                                            {
                                                if (\is_scalar($data) || $data === null) {
                                                    return $data;
                                                }
                                        Severity: Minor
                                        Found in src/Buy/Browse/V1/ObjectSerializer.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

                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language