brandon14/ebay-sdk-php

View on GitHub

Showing 3,709 of 3,709 total issues

Method suppressViolationRequest has 63 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function suppressViolationRequest($suppress_violation_request)
    {
        // Verify the required parameter 'suppress_violation_request' is set.
        if ($suppress_violation_request === null || (\is_array($suppress_violation_request) && count($suppress_violation_request) === 0)) {
            throw new \InvalidArgumentException('Missing the required parameter $suppress_violation_request when calling suppressViolation');
Severity: Major
Found in src/Sell/Compliance/V1/Api/ListingViolationApi.php - About 2 hrs to fix

    Method translateRequest has 63 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function translateRequest($translate_request)
        {
            // Verify the required parameter 'translate_request' is set.
            if ($translate_request === null || (\is_array($translate_request) && count($translate_request) === 0)) {
                throw new \InvalidArgumentException('Missing the required parameter $translate_request when calling translate');
    Severity: Major
    Found in src/Commerce/TranslationBeta/V1/Api/LanguageApi.php - About 2 hrs to fix

      Method createSubscriptionRequest has 63 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function createSubscriptionRequest($create_subscription_request = null)
          {
              $resourcePath = '/subscription';
              $formParams = [];
              $queryParams = [];
      Severity: Major
      Found in src/Commerce/Notification/V1/Api/SubscriptionApi.php - About 2 hrs to fix

        Method updateConfigRequest has 63 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function updateConfigRequest($config = null)
            {
                $resourcePath = '/config';
                $formParams = [];
                $queryParams = [];
        Severity: Major
        Found in src/Commerce/Notification/V1/Api/ConfigApi.php - About 2 hrs to fix

          Method createDestinationRequest has 63 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function createDestinationRequest($destination_request = null)
              {
                  $resourcePath = '/destination';
                  $formParams = [];
                  $queryParams = [];
          Severity: Major
          Found in src/Commerce/Notification/V1/Api/DestinationApi.php - About 2 hrs to fix

            File ItemGroupApi.php has 270 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/FeedBeta/V1/Api/ItemGroupApi.php - About 2 hrs to fix

              File ProductSummaryApi.php has 268 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/Commerce/CatalogBeta/V1/Api/ProductSummaryApi.php - About 2 hrs to fix

                Function getPaymentDisputeSummariesRequest has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                Open

                    public function getPaymentDisputeSummariesRequest($order_id = null, $buyer_username = null, $open_date_from = null, $open_date_to = null, $payment_dispute_status = null, $limit = null, $offset = null)
                    {
                        $resourcePath = '/payment_dispute_summary';
                        $formParams = [];
                        $queryParams = [];
                Severity: Minor
                Found in src/Sell/Fulfillment/V1/Api/PaymentDisputeApi.php - About 2 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 createSigningKeyRequest has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function createSigningKeyRequest($create_signing_key_request = null)
                    {
                        $resourcePath = '/signing_key';
                        $formParams = [];
                        $queryParams = [];
                Severity: Major
                Found in src/Developer/KeyManagement/V1/Api/SigningKeyApi.php - About 2 hrs to fix

                  Method registerClientRequest has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function registerClientRequest($client_settings)
                      {
                          // Verify the required parameter 'client_settings' is set.
                          if ($client_settings === null || (\is_array($client_settings) && count($client_settings) === 0)) {
                              throw new \InvalidArgumentException('Missing the required parameter $client_settings when calling registerClient');
                  Severity: Major
                  Found in src/Developer/ClientRegistration/V1/Api/RegisterApi.php - About 2 hrs to fix

                    Method getListingFeesRequest has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function getListingFeesRequest($offer_keys_with_id = null)
                        {
                            $resourcePath = '/offer/get_listing_fees';
                            $formParams = [];
                            $queryParams = [];
                    Severity: Major
                    Found in src/Sell/Inventory/V1/Api/OfferApi.php - About 2 hrs to fix

                      Method createVideoRequest has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function createVideoRequest($body = null)
                          {
                              $resourcePath = '/video';
                              $formParams = [];
                              $queryParams = [];
                      Severity: Major
                      Found in src/Commerce/MediaBeta/V1/Api/VideoApi.php - About 2 hrs to fix

                        Similar blocks of code found in 2 locations. Consider refactoring.
                        Open

                            public function search($x_ebay_c_marketplace_id = null, $aspect_filter = null, $category_ids = null, $fieldgroups = null, $gtin = null, $limit = null, $mpn = null, $offset = null, $q = null)
                            {
                                [$response] = $this->searchWithHttpInfo($x_ebay_c_marketplace_id, $aspect_filter, $category_ids, $fieldgroups, $gtin, $limit, $mpn, $offset, $q);
                        
                                return $response;
                        Severity: Major
                        Found in src/Commerce/CatalogBeta/V1/Api/ProductSummaryApi.php and 1 other location - About 2 hrs to fix
                        src/Buy/Browse/V1/Api/SearchByImageApi.php on lines 170..175

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

                        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

                        Similar blocks of code found in 2 locations. Consider refactoring.
                        Open

                            public function searchByImage($aspect_filter = null, $category_ids = null, $charity_ids = null, $fieldgroups = null, $filter = null, $limit = null, $offset = null, $sort = null, $search_by_image_request = null)
                            {
                                [$response] = $this->searchByImageWithHttpInfo($aspect_filter, $category_ids, $charity_ids, $fieldgroups, $filter, $limit, $offset, $sort, $search_by_image_request);
                        
                                return $response;
                        Severity: Major
                        Found in src/Buy/Browse/V1/Api/SearchByImageApi.php and 1 other location - About 2 hrs to fix
                        src/Commerce/CatalogBeta/V1/Api/ProductSummaryApi.php on lines 170..175

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

                        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

                        File ItemPriorityApi.php has 266 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/FeedBeta/V1/Api/ItemPriorityApi.php - About 2 hrs to fix

                          File ItemSnapshotApi.php has 266 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/FeedBeta/V1/Api/ItemSnapshotApi.php - About 2 hrs to fix

                            SellerCustomPolicy has 22 functions (exceeds 20 allowed). Consider refactoring.
                            Open

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

                              ReviewRating has 22 functions (exceeds 20 allowed). Consider refactoring.
                              Open

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

                                BuyingOptionDistribution has 22 functions (exceeds 20 allowed). Consider refactoring.
                                Open

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

                                  CompatibilityProperty has 22 functions (exceeds 20 allowed). Consider refactoring.
                                  Open

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