brandon14/ebay-sdk-php

View on GitHub
src/Sell/Inventory/V1/Model/EbayOfferDetailsWithId.php

Summary

Maintainability
F
3 days
Test Coverage

EbayOfferDetailsWithId has 50 functions (exceeds 20 allowed). Consider refactoring.
Open

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

    /**
Severity: Minor
Found in src/Sell/Inventory/V1/Model/EbayOfferDetailsWithId.php - About 7 hrs to fix

    File EbayOfferDetailsWithId.php has 348 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/Sell/Inventory/V1/Model/EbayOfferDetailsWithId.php - About 4 hrs to fix

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

          public function __construct(array $data = null)
          {
              $this->container['available_quantity'] = $data['available_quantity'] ?? null;
              $this->container['category_id'] = $data['category_id'] ?? null;
              $this->container['charity'] = $data['charity'] ?? null;
      Severity: Major
      Found in src/Sell/Inventory/V1/Model/EbayOfferDetailsWithId.php and 1 other location - About 2 days to fix
      src/Buy/Order/V2/Model/OrderLineItemV2.php on lines 295..314

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

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

          protected static $setters = [
              'available_quantity' => 'setAvailableQuantity',
              'category_id' => 'setCategoryId',
              'charity' => 'setCharity',
              'extended_producer_responsibility' => 'setExtendedProducerResponsibility',
      Severity: Major
      Found in src/Sell/Inventory/V1/Model/EbayOfferDetailsWithId.php and 7 other locations - About 35 mins to fix
      src/Buy/Order/V2/Model/OrderLineItemV2.php on lines 96..114
      src/Buy/Order/V2/Model/OrderLineItemV2.php on lines 171..189
      src/Buy/Order/V2/Model/OrderLineItemV2.php on lines 196..214
      src/Buy/Order/V2/Model/OrderLineItemV2.php on lines 221..239
      src/Sell/Inventory/V1/Model/EbayOfferDetailsWithId.php on lines 96..114
      src/Sell/Inventory/V1/Model/EbayOfferDetailsWithId.php on lines 171..189
      src/Sell/Inventory/V1/Model/EbayOfferDetailsWithId.php on lines 221..239

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

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

          protected static $attributeMap = [
              'available_quantity' => 'availableQuantity',
              'category_id' => 'categoryId',
              'charity' => 'charity',
              'extended_producer_responsibility' => 'extendedProducerResponsibility',
      Severity: Major
      Found in src/Sell/Inventory/V1/Model/EbayOfferDetailsWithId.php and 7 other locations - About 35 mins to fix
      src/Buy/Order/V2/Model/OrderLineItemV2.php on lines 96..114
      src/Buy/Order/V2/Model/OrderLineItemV2.php on lines 171..189
      src/Buy/Order/V2/Model/OrderLineItemV2.php on lines 196..214
      src/Buy/Order/V2/Model/OrderLineItemV2.php on lines 221..239
      src/Sell/Inventory/V1/Model/EbayOfferDetailsWithId.php on lines 96..114
      src/Sell/Inventory/V1/Model/EbayOfferDetailsWithId.php on lines 196..214
      src/Sell/Inventory/V1/Model/EbayOfferDetailsWithId.php on lines 221..239

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

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

          protected static $getters = [
              'available_quantity' => 'getAvailableQuantity',
              'category_id' => 'getCategoryId',
              'charity' => 'getCharity',
              'extended_producer_responsibility' => 'getExtendedProducerResponsibility',
      Severity: Major
      Found in src/Sell/Inventory/V1/Model/EbayOfferDetailsWithId.php and 7 other locations - About 35 mins to fix
      src/Buy/Order/V2/Model/OrderLineItemV2.php on lines 96..114
      src/Buy/Order/V2/Model/OrderLineItemV2.php on lines 171..189
      src/Buy/Order/V2/Model/OrderLineItemV2.php on lines 196..214
      src/Buy/Order/V2/Model/OrderLineItemV2.php on lines 221..239
      src/Sell/Inventory/V1/Model/EbayOfferDetailsWithId.php on lines 96..114
      src/Sell/Inventory/V1/Model/EbayOfferDetailsWithId.php on lines 171..189
      src/Sell/Inventory/V1/Model/EbayOfferDetailsWithId.php on lines 196..214

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

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

          protected static $openAPITypes = [
              'available_quantity' => 'int',
              'category_id' => 'string',
              'charity' => '\TNT\Ebay\Sell\Inventory\V1\Model\Charity',
              'extended_producer_responsibility' => '\TNT\Ebay\Sell\Inventory\V1\Model\ExtendedProducerResponsibility',
      Severity: Major
      Found in src/Sell/Inventory/V1/Model/EbayOfferDetailsWithId.php and 7 other locations - About 35 mins to fix
      src/Buy/Order/V2/Model/OrderLineItemV2.php on lines 96..114
      src/Buy/Order/V2/Model/OrderLineItemV2.php on lines 171..189
      src/Buy/Order/V2/Model/OrderLineItemV2.php on lines 196..214
      src/Buy/Order/V2/Model/OrderLineItemV2.php on lines 221..239
      src/Sell/Inventory/V1/Model/EbayOfferDetailsWithId.php on lines 171..189
      src/Sell/Inventory/V1/Model/EbayOfferDetailsWithId.php on lines 196..214
      src/Sell/Inventory/V1/Model/EbayOfferDetailsWithId.php on lines 221..239

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

      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