brandon14/ebay-sdk-php

View on GitHub

Showing 3,709 of 3,709 total issues

Identical blocks of code found in 5 locations. Consider refactoring.
Open

    public function searchAsyncWithHttpInfo($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)
    {
        $returnType = '\TNT\Ebay\Buy\Browse\V1\Model\SearchPagedCollection';
        $request = $this->searchRequest($aspect_filter, $auto_correct, $category_ids, $charity_ids, $compatibility_filter, $epid, $fieldgroups, $filter, $gtin, $limit, $offset, $q, $sort);

Severity: Major
Found in src/Buy/Browse/V1/Api/ItemSummaryApi.php and 4 other locations - About 1 hr to fix
src/Buy/Browse/V1/Api/ItemSummaryApi.php on lines 174..179
src/Buy/Browse/V1/Api/ItemSummaryApi.php on lines 203..268
src/Buy/Browse/V1/Api/ItemSummaryApi.php on lines 291..299
src/Buy/Browse/V1/Api/ItemSummaryApi.php on lines 373..551

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

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

Identical blocks of code found in 5 locations. Consider refactoring.
Open

    public function searchAsync($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)
    {
        return $this->searchAsyncWithHttpInfo($aspect_filter, $auto_correct, $category_ids, $charity_ids, $compatibility_filter, $epid, $fieldgroups, $filter, $gtin, $limit, $offset, $q, $sort)
            ->then(
                function ($response) {
Severity: Major
Found in src/Buy/Browse/V1/Api/ItemSummaryApi.php and 4 other locations - About 1 hr to fix
src/Buy/Browse/V1/Api/ItemSummaryApi.php on lines 174..179
src/Buy/Browse/V1/Api/ItemSummaryApi.php on lines 203..268
src/Buy/Browse/V1/Api/ItemSummaryApi.php on lines 322..350
src/Buy/Browse/V1/Api/ItemSummaryApi.php on lines 373..551

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

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

Identical blocks of code found in 5 locations. 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 and 4 other locations - About 1 hr to fix
src/Buy/Browse/V1/Api/ItemSummaryApi.php on lines 174..179
src/Buy/Browse/V1/Api/ItemSummaryApi.php on lines 203..268
src/Buy/Browse/V1/Api/ItemSummaryApi.php on lines 291..299
src/Buy/Browse/V1/Api/ItemSummaryApi.php on lines 322..350

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

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

Identical blocks of code found in 5 locations. Consider refactoring.
Open

    public function searchWithHttpInfo($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)
    {
        $request = $this->searchRequest($aspect_filter, $auto_correct, $category_ids, $charity_ids, $compatibility_filter, $epid, $fieldgroups, $filter, $gtin, $limit, $offset, $q, $sort);

        try {
Severity: Major
Found in src/Buy/Browse/V1/Api/ItemSummaryApi.php and 4 other locations - About 1 hr to fix
src/Buy/Browse/V1/Api/ItemSummaryApi.php on lines 174..179
src/Buy/Browse/V1/Api/ItemSummaryApi.php on lines 291..299
src/Buy/Browse/V1/Api/ItemSummaryApi.php on lines 322..350
src/Buy/Browse/V1/Api/ItemSummaryApi.php on lines 373..551

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

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

Identical blocks of code found in 5 locations. Consider refactoring.
Open

    public function search($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)
    {
        [$response] = $this->searchWithHttpInfo($aspect_filter, $auto_correct, $category_ids, $charity_ids, $compatibility_filter, $epid, $fieldgroups, $filter, $gtin, $limit, $offset, $q, $sort);

        return $response;
Severity: Major
Found in src/Buy/Browse/V1/Api/ItemSummaryApi.php and 4 other locations - About 1 hr to fix
src/Buy/Browse/V1/Api/ItemSummaryApi.php on lines 203..268
src/Buy/Browse/V1/Api/ItemSummaryApi.php on lines 291..299
src/Buy/Browse/V1/Api/ItemSummaryApi.php on lines 322..350
src/Buy/Browse/V1/Api/ItemSummaryApi.php on lines 373..551

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

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 4 locations. Consider refactoring.
Open

    protected static $setters = [
        'additional_images' => 'setAdditionalImages',
        'adult_only' => 'setAdultOnly',
        'bid_count' => 'setBidCount',
        'buying_options' => 'setBuyingOptions',
Severity: Major
Found in src/Buy/MarketplaceInsightsBeta/V1/Model/ItemSales.php and 3 other locations - About 1 hr to fix
src/Buy/MarketplaceInsightsBeta/V1/Model/ItemSales.php on lines 96..119
src/Buy/MarketplaceInsightsBeta/V1/Model/ItemSales.php on lines 181..204
src/Buy/MarketplaceInsightsBeta/V1/Model/ItemSales.php on lines 241..264

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

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 4 locations. Consider refactoring.
Open

    protected static $getters = [
        'additional_images' => 'getAdditionalImages',
        'adult_only' => 'getAdultOnly',
        'bid_count' => 'getBidCount',
        'buying_options' => 'getBuyingOptions',
Severity: Major
Found in src/Buy/MarketplaceInsightsBeta/V1/Model/ItemSales.php and 3 other locations - About 1 hr to fix
src/Buy/MarketplaceInsightsBeta/V1/Model/ItemSales.php on lines 96..119
src/Buy/MarketplaceInsightsBeta/V1/Model/ItemSales.php on lines 181..204
src/Buy/MarketplaceInsightsBeta/V1/Model/ItemSales.php on lines 211..234

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

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 4 locations. Consider refactoring.
Open

    protected static $openAPITypes = [
        'additional_images' => '\TNT\Ebay\Buy\MarketplaceInsightsBeta\V1\Model\Image[]',
        'adult_only' => 'bool',
        'bid_count' => 'int',
        'buying_options' => 'string[]',
Severity: Major
Found in src/Buy/MarketplaceInsightsBeta/V1/Model/ItemSales.php and 3 other locations - About 1 hr to fix
src/Buy/MarketplaceInsightsBeta/V1/Model/ItemSales.php on lines 181..204
src/Buy/MarketplaceInsightsBeta/V1/Model/ItemSales.php on lines 211..234
src/Buy/MarketplaceInsightsBeta/V1/Model/ItemSales.php on lines 241..264

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

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 4 locations. Consider refactoring.
Open

    protected static $attributeMap = [
        'additional_images' => 'additionalImages',
        'adult_only' => 'adultOnly',
        'bid_count' => 'bidCount',
        'buying_options' => 'buyingOptions',
Severity: Major
Found in src/Buy/MarketplaceInsightsBeta/V1/Model/ItemSales.php and 3 other locations - About 1 hr to fix
src/Buy/MarketplaceInsightsBeta/V1/Model/ItemSales.php on lines 96..119
src/Buy/MarketplaceInsightsBeta/V1/Model/ItemSales.php on lines 211..234
src/Buy/MarketplaceInsightsBeta/V1/Model/ItemSales.php on lines 241..264

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

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 __construct has 43 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function __construct(array $data = null)
    {
        $this->container['additional_images'] = $data['additional_images'] ?? null;
        $this->container['adult_only'] = $data['adult_only'] ?? null;
        $this->container['available_coupons'] = $data['available_coupons'] ?? null;
Severity: Minor
Found in src/Buy/Browse/V1/Model/ItemSummary.php - About 1 hr to fix

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

        public function getPaymentDisputeSummariesAsync($order_id = null, $buyer_username = null, $open_date_from = null, $open_date_to = null, $payment_dispute_status = null, $limit = null, $offset = null)
        {
            return $this->getPaymentDisputeSummariesAsyncWithHttpInfo($order_id, $buyer_username, $open_date_from, $open_date_to, $payment_dispute_status, $limit, $offset)
                ->then(
                    function ($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 1962..1970

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

    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 getCampaignsAsync($campaign_name = null, $campaign_status = null, $end_date_range = null, $funding_strategy = null, $limit = null, $offset = null, $start_date_range = null)
        {
            return $this->getCampaignsAsyncWithHttpInfo($campaign_name, $campaign_status, $end_date_range, $funding_strategy, $limit, $offset, $start_date_range)
                ->then(
                    function ($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 1918..1926

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

    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 sanitizeForSerialization has 41 lines of code (exceeds 25 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 1 hr to fix

      Method sanitizeForSerialization has 41 lines of code (exceeds 25 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/Deal/V1/ObjectSerializer.php - About 1 hr to fix

        Method sanitizeForSerialization has 41 lines of code (exceeds 25 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/MarketplaceInsightsBeta/V1/ObjectSerializer.php - About 1 hr to fix

          Method sanitizeForSerialization has 41 lines of code (exceeds 25 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/FeedBeta/V1/ObjectSerializer.php - About 1 hr to fix

            Method sanitizeForSerialization has 41 lines of code (exceeds 25 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/OfferBeta/V1/ObjectSerializer.php - About 1 hr to fix

              Method sanitizeForSerialization has 41 lines of code (exceeds 25 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/MarketingBeta/V1/ObjectSerializer.php - About 1 hr to fix

                Method sanitizeForSerialization has 41 lines of code (exceeds 25 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/Feed/V1/ObjectSerializer.php - About 1 hr to fix

                  Method sanitizeForSerialization has 41 lines of code (exceeds 25 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/Developer/AnalyticsBeta/V1/ObjectSerializer.php - About 1 hr to fix
                    Severity
                    Category
                    Status
                    Source
                    Language