brandon14/ebay-sdk-php

View on GitHub

Showing 3,709 of 3,709 total issues

Function getHostFromSettings has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

    public function getHostFromSettings($index, $variables = null)
    {
        if ($variables === null) {
            $variables = [];
        }
Severity: Minor
Found in src/Commerce/Taxonomy/V1/Configuration.php - About 1 hr 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

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

    public function getPaymentDisputeSummaries($order_id = null, $buyer_username = null, $open_date_from = null, $open_date_to = null, $payment_dispute_status = null, $limit = null, $offset = null)
    {
        [$response] = $this->getPaymentDisputeSummariesWithHttpInfo($order_id, $buyer_username, $open_date_from, $open_date_to, $payment_dispute_status, $limit, $offset);

        return $response;
Severity: Major
Found in src/Sell/Fulfillment/V1/Api/PaymentDisputeApi.php and 1 other location - About 1 hr to fix
src/Sell/Marketing/V1/Api/CampaignApi.php on lines 1857..1862

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

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 getCampaigns($campaign_name = null, $campaign_status = null, $end_date_range = null, $funding_strategy = null, $limit = null, $offset = null, $start_date_range = null)
    {
        [$response] = $this->getCampaignsWithHttpInfo($campaign_name, $campaign_status, $end_date_range, $funding_strategy, $limit, $offset, $start_date_range);

        return $response;
Severity: Major
Found in src/Sell/Marketing/V1/Api/CampaignApi.php and 1 other location - About 1 hr to fix
src/Sell/Fulfillment/V1/Api/PaymentDisputeApi.php on lines 1803..1808

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

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 searchByImage has 9 arguments (exceeds 4 allowed). 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)
Severity: Major
Found in src/Buy/Browse/V1/Api/SearchByImageApi.php - About 1 hr to fix

    Method searchByImageWithHttpInfo has 9 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        public function searchByImageWithHttpInfo($aspect_filter = null, $category_ids = null, $charity_ids = null, $fieldgroups = null, $filter = null, $limit = null, $offset = null, $sort = null, $search_by_image_request = null)
    Severity: Major
    Found in src/Buy/Browse/V1/Api/SearchByImageApi.php - About 1 hr to fix

      Method searchByImageAsyncWithHttpInfo has 9 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          public function searchByImageAsyncWithHttpInfo($aspect_filter = null, $category_ids = null, $charity_ids = null, $fieldgroups = null, $filter = null, $limit = null, $offset = null, $sort = null, $search_by_image_request = null)
      Severity: Major
      Found in src/Buy/Browse/V1/Api/SearchByImageApi.php - About 1 hr to fix

        Method searchByImageAsync has 9 arguments (exceeds 4 allowed). 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)
        Severity: Major
        Found in src/Buy/Browse/V1/Api/SearchByImageApi.php - About 1 hr to fix

          Method searchByImageRequest has 9 arguments (exceeds 4 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)
          Severity: Major
          Found in src/Buy/Browse/V1/Api/SearchByImageApi.php - About 1 hr to fix

            Method search has 9 arguments (exceeds 4 allowed). 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)
            Severity: Major
            Found in src/Commerce/CatalogBeta/V1/Api/ProductSummaryApi.php - About 1 hr to fix

              Method searchWithHttpInfo has 9 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  public function searchWithHttpInfo($x_ebay_c_marketplace_id = null, $aspect_filter = null, $category_ids = null, $fieldgroups = null, $gtin = null, $limit = null, $mpn = null, $offset = null, $q = null)
              Severity: Major
              Found in src/Commerce/CatalogBeta/V1/Api/ProductSummaryApi.php - About 1 hr to fix

                Method searchAsyncWithHttpInfo has 9 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    public function searchAsyncWithHttpInfo($x_ebay_c_marketplace_id = null, $aspect_filter = null, $category_ids = null, $fieldgroups = null, $gtin = null, $limit = null, $mpn = null, $offset = null, $q = null)
                Severity: Major
                Found in src/Commerce/CatalogBeta/V1/Api/ProductSummaryApi.php - About 1 hr to fix

                  Method searchAsync has 9 arguments (exceeds 4 allowed). 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)
                  Severity: Major
                  Found in src/Commerce/CatalogBeta/V1/Api/ProductSummaryApi.php - About 1 hr to fix

                    Method searchRequest has 9 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        public function searchRequest($x_ebay_c_marketplace_id = null, $aspect_filter = null, $category_ids = null, $fieldgroups = null, $gtin = null, $limit = null, $mpn = null, $offset = null, $q = null)
                    Severity: Major
                    Found in src/Commerce/CatalogBeta/V1/Api/ProductSummaryApi.php - About 1 hr to fix

                      Method toQueryValue has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public static function toQueryValue(
                              $value,
                              string $paramName,
                              string $openApiType = 'string',
                              string $style = 'form',
                      Severity: Minor
                      Found in src/Buy/Browse/V1/ObjectSerializer.php - About 1 hr to fix

                        Method toQueryValue has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public static function toQueryValue(
                                $value,
                                string $paramName,
                                string $openApiType = 'string',
                                string $style = 'form',
                        Severity: Minor
                        Found in src/Buy/FeedBeta/V1/ObjectSerializer.php - About 1 hr to fix

                          Method toQueryValue has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public static function toQueryValue(
                                  $value,
                                  string $paramName,
                                  string $openApiType = 'string',
                                  string $style = 'form',
                          Severity: Minor
                          Found in src/Buy/Deal/V1/ObjectSerializer.php - About 1 hr to fix

                            Method toQueryValue has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public static function toQueryValue(
                                    $value,
                                    string $paramName,
                                    string $openApiType = 'string',
                                    string $style = 'form',
                            Severity: Minor
                            Found in src/Buy/MarketplaceInsightsBeta/V1/ObjectSerializer.php - About 1 hr to fix

                              Method toQueryValue has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public static function toQueryValue(
                                      $value,
                                      string $paramName,
                                      string $openApiType = 'string',
                                      string $style = 'form',
                              Severity: Minor
                              Found in src/Buy/Feed/V1/ObjectSerializer.php - About 1 hr to fix

                                Method toQueryValue has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public static function toQueryValue(
                                        $value,
                                        string $paramName,
                                        string $openApiType = 'string',
                                        string $style = 'form',
                                Severity: Minor
                                Found in src/Buy/MarketingBeta/V1/ObjectSerializer.php - About 1 hr to fix

                                  Method toQueryValue has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public static function toQueryValue(
                                          $value,
                                          string $paramName,
                                          string $openApiType = 'string',
                                          string $style = 'form',
                                  Severity: Minor
                                  Found in src/Buy/OfferBeta/V1/ObjectSerializer.php - About 1 hr to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language