brandon14/ebay-sdk-php

View on GitHub

Showing 3,709 of 3,709 total issues

Method createOrReplaceProductCompatibilityWithHttpInfo has 72 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function createOrReplaceProductCompatibilityWithHttpInfo($content_language, $sku, $compatibility)
    {
        $request = $this->createOrReplaceProductCompatibilityRequest($content_language, $sku, $compatibility);

        try {
Severity: Major
Found in src/Sell/Inventory/V1/Api/ProductCompatibilityApi.php - About 2 hrs to fix

    Method createOrReplaceInventoryItemWithHttpInfo has 72 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function createOrReplaceInventoryItemWithHttpInfo($content_language, $sku, $inventory_item)
        {
            $request = $this->createOrReplaceInventoryItemRequest($content_language, $sku, $inventory_item);
    
            try {
    Severity: Major
    Found in src/Sell/Inventory/V1/Api/InventoryItemApi.php - About 2 hrs to fix

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

          public function searchByImageAsync($aspect_filter = null, $category_ids = null, $charity_ids = null, $fieldgroups = null, $filter = null, $limit = null, $offset = null, $sort = null, $search_by_image_request = null)
          {
              return $this->searchByImageAsyncWithHttpInfo($aspect_filter, $category_ids, $charity_ids, $fieldgroups, $filter, $limit, $offset, $sort, $search_by_image_request)
                  ->then(
                      function ($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 279..287

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

      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 searchAsync($x_ebay_c_marketplace_id = null, $aspect_filter = null, $category_ids = null, $fieldgroups = null, $gtin = null, $limit = null, $mpn = null, $offset = null, $q = null)
          {
              return $this->searchAsyncWithHttpInfo($x_ebay_c_marketplace_id, $aspect_filter, $category_ids, $fieldgroups, $gtin, $limit, $mpn, $offset, $q)
                  ->then(
                      function ($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 279..287

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

      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

      Method getItemsRequest has 71 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function getItemsRequest($item_ids = null, $item_group_ids = null)
          {
              $resourcePath = '/item/';
              $formParams = [];
              $queryParams = [];
      Severity: Major
      Found in src/Buy/Browse/V1/Api/ItemApi.php - About 2 hrs to fix

        Method getUserRateLimitsRequest has 71 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function getUserRateLimitsRequest($api_context = null, $api_name = null)
            {
                $resourcePath = '/user_rate_limit/';
                $formParams = [];
                $queryParams = [];
        Severity: Major
        Found in src/Developer/AnalyticsBeta/V1/Api/UserRateLimitApi.php - About 2 hrs to fix

          Method getRateLimitsRequest has 71 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function getRateLimitsRequest($api_context = null, $api_name = null)
              {
                  $resourcePath = '/rate_limit/';
                  $formParams = [];
                  $queryParams = [];
          Severity: Major
          Found in src/Developer/AnalyticsBeta/V1/Api/RateLimitApi.php - About 2 hrs to fix

            Method getSubscriptionRequest has 71 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function getSubscriptionRequest($limit = null, $continuation_token = null)
                {
                    $resourcePath = '/subscription';
                    $formParams = [];
                    $queryParams = [];
            Severity: Major
            Found in src/Sell/Account/V1/Api/SubscriptionApi.php - About 2 hrs to fix

              Method getOrderRequest has 71 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function getOrderRequest($order_id, $field_groups = null)
                  {
                      // Verify the required parameter 'order_id' is set.
                      if ($order_id === null || (\is_array($order_id) && count($order_id) === 0)) {
                          throw new \InvalidArgumentException('Missing the required parameter $order_id when calling getOrder');
              Severity: Major
              Found in src/Sell/Fulfillment/V1/Api/OrderApi.php - About 2 hrs to fix

                Method getSubscriptionsRequest has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

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

                  Method getDestinationsRequest has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

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

                    Method getTopicsRequest has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function getTopicsRequest($limit = null, $continuation_token = null)
                        {
                            $resourcePath = '/topic';
                            $formParams = [];
                            $queryParams = [];
                    Severity: Major
                    Found in src/Commerce/Notification/V1/Api/TopicApi.php - About 2 hrs to fix

                      ShoppingCartApi has 25 functions (exceeds 20 allowed). Consider refactoring.
                      Open

                      class ShoppingCartApi
                      {
                          /**
                           * @var ClientInterface
                           */
                      Severity: Minor
                      Found in src/Buy/Browse/V1/Api/ShoppingCartApi.php - About 2 hrs to fix

                        ShipmentApi has 25 functions (exceeds 20 allowed). Consider refactoring.
                        Open

                        class ShipmentApi
                        {
                            /**
                             * @var ClientInterface
                             */
                        Severity: Minor
                        Found in src/Sell/Logistics/V1/Api/ShipmentApi.php - About 2 hrs to fix

                          ItemPromotionApi has 25 functions (exceeds 20 allowed). Consider refactoring.
                          Open

                          class ItemPromotionApi
                          {
                              /**
                               * @var ClientInterface
                               */
                          Severity: Minor
                          Found in src/Sell/Marketing/V1/Api/ItemPromotionApi.php - About 2 hrs to fix

                            PromotionApi has 25 functions (exceeds 20 allowed). Consider refactoring.
                            Open

                            class PromotionApi
                            {
                                /**
                                 * @var ClientInterface
                                 */
                            Severity: Minor
                            Found in src/Sell/Marketing/V1/Api/PromotionApi.php - About 2 hrs to fix

                              ItemPriceMarkdownApi has 25 functions (exceeds 20 allowed). Consider refactoring.
                              Open

                              class ItemPriceMarkdownApi
                              {
                                  /**
                                   * @var ClientInterface
                                   */
                              Severity: Minor
                              Found in src/Sell/Marketing/V1/Api/ItemPriceMarkdownApi.php - About 2 hrs to fix

                                AdReportTaskApi has 25 functions (exceeds 20 allowed). Consider refactoring.
                                Open

                                class AdReportTaskApi
                                {
                                    /**
                                     * @var ClientInterface
                                     */
                                Severity: Minor
                                Found in src/Sell/Marketing/V1/Api/AdReportTaskApi.php - About 2 hrs to fix

                                  SalesTaxApi has 25 functions (exceeds 20 allowed). Consider refactoring.
                                  Open

                                  class SalesTaxApi
                                  {
                                      /**
                                       * @var ClientInterface
                                       */
                                  Severity: Minor
                                  Found in src/Sell/Account/V1/Api/SalesTaxApi.php - About 2 hrs to fix

                                    CustomPolicyApi has 25 functions (exceeds 20 allowed). Consider refactoring.
                                    Open

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