brandon14/ebay-sdk-php

View on GitHub
src/Sell/Fulfillment/V1/Model/Order.php

Summary

Maintainability
F
4 days
Test Coverage

Order has 56 functions (exceeds 20 allowed). Consider refactoring.
Open

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

    /**
Severity: Major
Found in src/Sell/Fulfillment/V1/Model/Order.php - About 1 day to fix

    File Order.php has 393 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/Fulfillment/V1/Model/Order.php - About 5 hrs to fix

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

          public function __construct(array $data = null)
          {
              $this->container['buyer'] = $data['buyer'] ?? null;
              $this->container['buyer_checkout_notes'] = $data['buyer_checkout_notes'] ?? null;
              $this->container['cancel_status'] = $data['cancel_status'] ?? null;
      Severity: Major
      Found in src/Sell/Fulfillment/V1/Model/Order.php and 1 other location - About 2 days to fix
      src/Sell/Inventory/V1/Model/EbayOfferDetailsWithKeys.php on lines 310..332

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

      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 = [
              'buyer' => 'buyer',
              'buyer_checkout_notes' => 'buyerCheckoutNotes',
              'cancel_status' => 'cancelStatus',
              'creation_date' => 'creationDate',
      Severity: Major
      Found in src/Sell/Fulfillment/V1/Model/Order.php and 7 other locations - About 1 hr to fix
      src/Sell/Fulfillment/V1/Model/Order.php on lines 96..117
      src/Sell/Fulfillment/V1/Model/Order.php on lines 205..226
      src/Sell/Fulfillment/V1/Model/Order.php on lines 233..254
      src/Sell/Inventory/V1/Model/EbayOfferDetailsWithKeys.php on lines 96..117
      src/Sell/Inventory/V1/Model/EbayOfferDetailsWithKeys.php on lines 177..198
      src/Sell/Inventory/V1/Model/EbayOfferDetailsWithKeys.php on lines 205..226
      src/Sell/Inventory/V1/Model/EbayOfferDetailsWithKeys.php on lines 233..254

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

      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 = [
              'buyer' => 'getBuyer',
              'buyer_checkout_notes' => 'getBuyerCheckoutNotes',
              'cancel_status' => 'getCancelStatus',
              'creation_date' => 'getCreationDate',
      Severity: Major
      Found in src/Sell/Fulfillment/V1/Model/Order.php and 7 other locations - About 1 hr to fix
      src/Sell/Fulfillment/V1/Model/Order.php on lines 96..117
      src/Sell/Fulfillment/V1/Model/Order.php on lines 177..198
      src/Sell/Fulfillment/V1/Model/Order.php on lines 205..226
      src/Sell/Inventory/V1/Model/EbayOfferDetailsWithKeys.php on lines 96..117
      src/Sell/Inventory/V1/Model/EbayOfferDetailsWithKeys.php on lines 177..198
      src/Sell/Inventory/V1/Model/EbayOfferDetailsWithKeys.php on lines 205..226
      src/Sell/Inventory/V1/Model/EbayOfferDetailsWithKeys.php on lines 233..254

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

      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 = [
              'buyer' => 'setBuyer',
              'buyer_checkout_notes' => 'setBuyerCheckoutNotes',
              'cancel_status' => 'setCancelStatus',
              'creation_date' => 'setCreationDate',
      Severity: Major
      Found in src/Sell/Fulfillment/V1/Model/Order.php and 7 other locations - About 1 hr to fix
      src/Sell/Fulfillment/V1/Model/Order.php on lines 96..117
      src/Sell/Fulfillment/V1/Model/Order.php on lines 177..198
      src/Sell/Fulfillment/V1/Model/Order.php on lines 233..254
      src/Sell/Inventory/V1/Model/EbayOfferDetailsWithKeys.php on lines 96..117
      src/Sell/Inventory/V1/Model/EbayOfferDetailsWithKeys.php on lines 177..198
      src/Sell/Inventory/V1/Model/EbayOfferDetailsWithKeys.php on lines 205..226
      src/Sell/Inventory/V1/Model/EbayOfferDetailsWithKeys.php on lines 233..254

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

      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 = [
              'buyer' => '\TNT\Ebay\Sell\Fulfillment\V1\Model\Buyer',
              'buyer_checkout_notes' => 'string',
              'cancel_status' => '\TNT\Ebay\Sell\Fulfillment\V1\Model\CancelStatus',
              'creation_date' => 'string',
      Severity: Major
      Found in src/Sell/Fulfillment/V1/Model/Order.php and 7 other locations - About 1 hr to fix
      src/Sell/Fulfillment/V1/Model/Order.php on lines 177..198
      src/Sell/Fulfillment/V1/Model/Order.php on lines 205..226
      src/Sell/Fulfillment/V1/Model/Order.php on lines 233..254
      src/Sell/Inventory/V1/Model/EbayOfferDetailsWithKeys.php on lines 96..117
      src/Sell/Inventory/V1/Model/EbayOfferDetailsWithKeys.php on lines 177..198
      src/Sell/Inventory/V1/Model/EbayOfferDetailsWithKeys.php on lines 205..226
      src/Sell/Inventory/V1/Model/EbayOfferDetailsWithKeys.php on lines 233..254

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

      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