brandon14/ebay-sdk-php

View on GitHub
src/Buy/Order/V2/Model/OrderLineItemV2.php

Summary

Maintainability
F
3 days
Test Coverage

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

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

    /**
Severity: Minor
Found in src/Buy/Order/V2/Model/OrderLineItemV2.php - About 7 hrs to fix

    File OrderLineItemV2.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/Buy/Order/V2/Model/OrderLineItemV2.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['authenticity_verification'] = $data['authenticity_verification'] ?? null;
              $this->container['base_unit_price'] = $data['base_unit_price'] ?? null;
              $this->container['fees'] = $data['fees'] ?? null;
      Severity: Major
      Found in src/Buy/Order/V2/Model/OrderLineItemV2.php and 1 other location - About 2 days to fix
      src/Sell/Inventory/V1/Model/EbayOfferDetailsWithId.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 $attributeMap = [
              'authenticity_verification' => 'authenticityVerification',
              'base_unit_price' => 'baseUnitPrice',
              'fees' => 'fees',
              'image' => 'image',
      Severity: Major
      Found in src/Buy/Order/V2/Model/OrderLineItemV2.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 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
      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 $setters = [
              'authenticity_verification' => 'setAuthenticityVerification',
              'base_unit_price' => 'setBaseUnitPrice',
              'fees' => 'setFees',
              'image' => 'setImage',
      Severity: Major
      Found in src/Buy/Order/V2/Model/OrderLineItemV2.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 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
      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 = [
              'authenticity_verification' => 'getAuthenticityVerification',
              'base_unit_price' => 'getBaseUnitPrice',
              'fees' => 'getFees',
              'image' => 'getImage',
      Severity: Major
      Found in src/Buy/Order/V2/Model/OrderLineItemV2.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/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
      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 $openAPITypes = [
              'authenticity_verification' => '\TNT\Ebay\Buy\Order\V2\Model\AuthenticityVerificationProgram',
              'base_unit_price' => '\TNT\Ebay\Buy\Order\V2\Model\Amount',
              'fees' => '\TNT\Ebay\Buy\Order\V2\Model\Fee[]',
              'image' => '\TNT\Ebay\Buy\Order\V2\Model\Image',
      Severity: Major
      Found in src/Buy/Order/V2/Model/OrderLineItemV2.php and 7 other locations - About 35 mins to fix
      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
      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