brandon14/ebay-sdk-php

View on GitHub
src/Buy/Deal/V1/Model/DealItem.php

Summary

Maintainability
F
5 days
Test Coverage

DealItem has 62 functions (exceeds 20 allowed). Consider refactoring.
Open

class DealItem implements ModelInterface, \ArrayAccess, \JsonSerializable
{
    public const DISCRIMINATOR = null;

    /**
Severity: Major
Found in src/Buy/Deal/V1/Model/DealItem.php - About 1 day to fix

    File DealItem.php has 438 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/Model/DealItem.php - About 6 hrs to fix

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

          public function __construct(array $data = null)
          {
              $this->container['additional_images'] = $data['additional_images'] ?? null;
              $this->container['category_ancestor_ids'] = $data['category_ancestor_ids'] ?? null;
              $this->container['category_id'] = $data['category_id'] ?? null;
      Severity: Major
      Found in src/Buy/Deal/V1/Model/DealItem.php and 2 other locations - About 2 days to fix
      src/Sell/Fulfillment/V1/Model/LineItem.php on lines 325..350
      src/Sell/Inventory/V1/Model/EbayOfferDetailsWithAll.php on lines 325..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 565.

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

          protected static $getters = [
              'additional_images' => 'getAdditionalImages',
              'category_ancestor_ids' => 'getCategoryAncestorIds',
              'category_id' => 'getCategoryId',
              'commissionable' => 'getCommissionable',
      Severity: Major
      Found in src/Buy/Deal/V1/Model/DealItem.php and 11 other locations - About 2 hrs to fix
      src/Buy/Deal/V1/Model/DealItem.php on lines 96..120
      src/Buy/Deal/V1/Model/DealItem.php on lines 183..207
      src/Buy/Deal/V1/Model/DealItem.php on lines 214..238
      src/Sell/Fulfillment/V1/Model/LineItem.php on lines 96..120
      src/Sell/Fulfillment/V1/Model/LineItem.php on lines 183..207
      src/Sell/Fulfillment/V1/Model/LineItem.php on lines 214..238
      src/Sell/Fulfillment/V1/Model/LineItem.php on lines 245..269
      src/Sell/Inventory/V1/Model/EbayOfferDetailsWithAll.php on lines 96..120
      src/Sell/Inventory/V1/Model/EbayOfferDetailsWithAll.php on lines 183..207
      src/Sell/Inventory/V1/Model/EbayOfferDetailsWithAll.php on lines 214..238
      src/Sell/Inventory/V1/Model/EbayOfferDetailsWithAll.php on lines 245..269

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

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

          protected static $openAPITypes = [
              'additional_images' => '\TNT\Ebay\Buy\Deal\V1\Model\Image[]',
              'category_ancestor_ids' => 'string[]',
              'category_id' => 'string',
              'commissionable' => 'bool',
      Severity: Major
      Found in src/Buy/Deal/V1/Model/DealItem.php and 11 other locations - About 2 hrs to fix
      src/Buy/Deal/V1/Model/DealItem.php on lines 183..207
      src/Buy/Deal/V1/Model/DealItem.php on lines 214..238
      src/Buy/Deal/V1/Model/DealItem.php on lines 245..269
      src/Sell/Fulfillment/V1/Model/LineItem.php on lines 96..120
      src/Sell/Fulfillment/V1/Model/LineItem.php on lines 183..207
      src/Sell/Fulfillment/V1/Model/LineItem.php on lines 214..238
      src/Sell/Fulfillment/V1/Model/LineItem.php on lines 245..269
      src/Sell/Inventory/V1/Model/EbayOfferDetailsWithAll.php on lines 96..120
      src/Sell/Inventory/V1/Model/EbayOfferDetailsWithAll.php on lines 183..207
      src/Sell/Inventory/V1/Model/EbayOfferDetailsWithAll.php on lines 214..238
      src/Sell/Inventory/V1/Model/EbayOfferDetailsWithAll.php on lines 245..269

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

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

          protected static $attributeMap = [
              'additional_images' => 'additionalImages',
              'category_ancestor_ids' => 'categoryAncestorIds',
              'category_id' => 'categoryId',
              'commissionable' => 'commissionable',
      Severity: Major
      Found in src/Buy/Deal/V1/Model/DealItem.php and 11 other locations - About 2 hrs to fix
      src/Buy/Deal/V1/Model/DealItem.php on lines 96..120
      src/Buy/Deal/V1/Model/DealItem.php on lines 214..238
      src/Buy/Deal/V1/Model/DealItem.php on lines 245..269
      src/Sell/Fulfillment/V1/Model/LineItem.php on lines 96..120
      src/Sell/Fulfillment/V1/Model/LineItem.php on lines 183..207
      src/Sell/Fulfillment/V1/Model/LineItem.php on lines 214..238
      src/Sell/Fulfillment/V1/Model/LineItem.php on lines 245..269
      src/Sell/Inventory/V1/Model/EbayOfferDetailsWithAll.php on lines 96..120
      src/Sell/Inventory/V1/Model/EbayOfferDetailsWithAll.php on lines 183..207
      src/Sell/Inventory/V1/Model/EbayOfferDetailsWithAll.php on lines 214..238
      src/Sell/Inventory/V1/Model/EbayOfferDetailsWithAll.php on lines 245..269

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

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

          protected static $setters = [
              'additional_images' => 'setAdditionalImages',
              'category_ancestor_ids' => 'setCategoryAncestorIds',
              'category_id' => 'setCategoryId',
              'commissionable' => 'setCommissionable',
      Severity: Major
      Found in src/Buy/Deal/V1/Model/DealItem.php and 11 other locations - About 2 hrs to fix
      src/Buy/Deal/V1/Model/DealItem.php on lines 96..120
      src/Buy/Deal/V1/Model/DealItem.php on lines 183..207
      src/Buy/Deal/V1/Model/DealItem.php on lines 245..269
      src/Sell/Fulfillment/V1/Model/LineItem.php on lines 96..120
      src/Sell/Fulfillment/V1/Model/LineItem.php on lines 183..207
      src/Sell/Fulfillment/V1/Model/LineItem.php on lines 214..238
      src/Sell/Fulfillment/V1/Model/LineItem.php on lines 245..269
      src/Sell/Inventory/V1/Model/EbayOfferDetailsWithAll.php on lines 96..120
      src/Sell/Inventory/V1/Model/EbayOfferDetailsWithAll.php on lines 183..207
      src/Sell/Inventory/V1/Model/EbayOfferDetailsWithAll.php on lines 214..238
      src/Sell/Inventory/V1/Model/EbayOfferDetailsWithAll.php on lines 245..269

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

      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

      There are no issues that match your filters.

      Category
      Status