brandon14/ebay-sdk-php

View on GitHub

Showing 3,709 of 3,709 total issues

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

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 = [
        'available_quantity' => 'getAvailableQuantity',
        'category_id' => 'getCategoryId',
        'charity' => 'getCharity',
        'extended_producer_responsibility' => 'getExtendedProducerResponsibility',
Severity: Major
Found in src/Sell/Inventory/V1/Model/EbayOfferDetailsWithKeys.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/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

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 = [
        'available_quantity' => 'setAvailableQuantity',
        'category_id' => 'setCategoryId',
        'charity' => 'setCharity',
        'extended_producer_responsibility' => 'setExtendedProducerResponsibility',
Severity: Major
Found in src/Sell/Inventory/V1/Model/EbayOfferDetailsWithKeys.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/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 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

Method __construct has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function __construct(array $data = null)
    {
        $this->container['adjustment_amount'] = $data['adjustment_amount'] ?? null;
        $this->container['adjustment_booking_entry'] = $data['adjustment_booking_entry'] ?? null;
        $this->container['adjustment_count'] = $data['adjustment_count'] ?? null;
Severity: Minor
Found in src/Sell/Finances/V1/Model/TransactionSummaryResponse.php - About 1 hr to fix

    Function getHostFromSettings has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
    Open

        public function getHostFromSettings($index, $variables = null)
        {
            if ($variables === null) {
                $variables = [];
            }
    Severity: Minor
    Found in src/Buy/Browse/V1/Configuration.php - About 1 hr to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function getHostFromSettings has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
    Open

        public function getHostFromSettings($index, $variables = null)
        {
            if ($variables === null) {
                $variables = [];
            }
    Severity: Minor
    Found in src/Buy/Deal/V1/Configuration.php - About 1 hr to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Method search has 10 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        public function search($aspect_filter = null, $category_ids = null, $epid = null, $fieldgroups = null, $filter = null, $gtin = null, $limit = null, $offset = null, $q = null, $sort = null)
    Severity: Major
    Found in src/Buy/MarketplaceInsightsBeta/V1/Api/ItemSalesApi.php - About 1 hr to fix

      Method searchWithHttpInfo has 10 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          public function searchWithHttpInfo($aspect_filter = null, $category_ids = null, $epid = null, $fieldgroups = null, $filter = null, $gtin = null, $limit = null, $offset = null, $q = null, $sort = null)
      Severity: Major
      Found in src/Buy/MarketplaceInsightsBeta/V1/Api/ItemSalesApi.php - About 1 hr to fix

        Function getHostFromSettings has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
        Open

            public function getHostFromSettings($index, $variables = null)
            {
                if ($variables === null) {
                    $variables = [];
                }
        Severity: Minor
        Found in src/Buy/FeedBeta/V1/Configuration.php - About 1 hr to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Method searchRequest has 10 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            public function searchRequest($aspect_filter = null, $category_ids = null, $epid = null, $fieldgroups = null, $filter = null, $gtin = null, $limit = null, $offset = null, $q = null, $sort = null)
        Severity: Major
        Found in src/Buy/MarketplaceInsightsBeta/V1/Api/ItemSalesApi.php - About 1 hr to fix

          Method searchAsyncWithHttpInfo has 10 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              public function searchAsyncWithHttpInfo($aspect_filter = null, $category_ids = null, $epid = null, $fieldgroups = null, $filter = null, $gtin = null, $limit = null, $offset = null, $q = null, $sort = null)
          Severity: Major
          Found in src/Buy/MarketplaceInsightsBeta/V1/Api/ItemSalesApi.php - About 1 hr to fix

            Method searchAsync has 10 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                public function searchAsync($aspect_filter = null, $category_ids = null, $epid = null, $fieldgroups = null, $filter = null, $gtin = null, $limit = null, $offset = null, $q = null, $sort = null)
            Severity: Major
            Found in src/Buy/MarketplaceInsightsBeta/V1/Api/ItemSalesApi.php - About 1 hr to fix

              Function getHostFromSettings has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function getHostFromSettings($index, $variables = null)
                  {
                      if ($variables === null) {
                          $variables = [];
                      }
              Severity: Minor
              Found in src/Buy/MarketplaceInsightsBeta/V1/Configuration.php - About 1 hr to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function getHostFromSettings has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function getHostFromSettings($index, $variables = null)
                  {
                      if ($variables === null) {
                          $variables = [];
                      }
              Severity: Minor
              Found in src/Buy/MarketingBeta/V1/Configuration.php - About 1 hr to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function getHostFromSettings has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function getHostFromSettings($index, $variables = null)
                  {
                      if ($variables === null) {
                          $variables = [];
                      }
              Severity: Minor
              Found in src/Buy/Feed/V1/Configuration.php - About 1 hr to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function getHostFromSettings has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function getHostFromSettings($index, $variables = null)
                  {
                      if ($variables === null) {
                          $variables = [];
                      }
              Severity: Minor
              Found in src/Buy/OfferBeta/V1/Configuration.php - About 1 hr to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function getHostFromSettings has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function getHostFromSettings($index, $variables = null)
                  {
                      if ($variables === null) {
                          $variables = [];
                      }
              Severity: Minor
              Found in src/Developer/KeyManagement/V1/Configuration.php - About 1 hr to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function getHostFromSettings has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function getHostFromSettings($index, $variables = null)
                  {
                      if ($variables === null) {
                          $variables = [];
                      }
              Severity: Minor
              Found in src/Developer/AnalyticsBeta/V1/Configuration.php - About 1 hr to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function getHostFromSettings has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function getHostFromSettings($index, $variables = null)
                  {
                      if ($variables === null) {
                          $variables = [];
                      }
              Severity: Minor
              Found in src/Buy/Order/V2/Configuration.php - About 1 hr to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Severity
              Category
              Status
              Source
              Language