brandon14/ebay-sdk-php

View on GitHub
src/Sell/Metadata/V1/Api/MarketplaceApi.php

Summary

Maintainability
F
1 mo
Test Coverage

File MarketplaceApi.php has 1094 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

/**
 * This file is part of the trollandtoad/ebay-sdk-php package.
 *
Severity: Major
Found in src/Sell/Metadata/V1/Api/MarketplaceApi.php - About 2 days to fix

    MarketplaceApi has 35 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class MarketplaceApi
    {
        /**
         * @var ClientInterface
         */
    Severity: Minor
    Found in src/Sell/Metadata/V1/Api/MarketplaceApi.php - About 4 hrs to fix

      Method getItemConditionPoliciesRequest has 74 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function getItemConditionPoliciesRequest($marketplace_id, $filter = null)
          {
              // Verify the required parameter 'marketplace_id' is set.
              if ($marketplace_id === null || (\is_array($marketplace_id) && count($marketplace_id) === 0)) {
                  throw new \InvalidArgumentException('Missing the required parameter $marketplace_id when calling getItemConditionPolicies');
      Severity: Major
      Found in src/Sell/Metadata/V1/Api/MarketplaceApi.php - About 2 hrs to fix

        Method getAutomotivePartsCompatibilityPoliciesRequest has 74 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function getAutomotivePartsCompatibilityPoliciesRequest($marketplace_id, $filter = null)
            {
                // Verify the required parameter 'marketplace_id' is set.
                if ($marketplace_id === null || (\is_array($marketplace_id) && count($marketplace_id) === 0)) {
                    throw new \InvalidArgumentException('Missing the required parameter $marketplace_id when calling getAutomotivePartsCompatibilityPolicies');
        Severity: Major
        Found in src/Sell/Metadata/V1/Api/MarketplaceApi.php - About 2 hrs to fix

          Method getExtendedProducerResponsibilityPoliciesRequest has 74 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function getExtendedProducerResponsibilityPoliciesRequest($marketplace_id, $filter = null)
              {
                  // Verify the required parameter 'marketplace_id' is set.
                  if ($marketplace_id === null || (\is_array($marketplace_id) && count($marketplace_id) === 0)) {
                      throw new \InvalidArgumentException('Missing the required parameter $marketplace_id when calling getExtendedProducerResponsibilityPolicies');
          Severity: Major
          Found in src/Sell/Metadata/V1/Api/MarketplaceApi.php - About 2 hrs to fix

            Method getReturnPoliciesRequest has 74 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function getReturnPoliciesRequest($marketplace_id, $filter = null)
                {
                    // Verify the required parameter 'marketplace_id' is set.
                    if ($marketplace_id === null || (\is_array($marketplace_id) && count($marketplace_id) === 0)) {
                        throw new \InvalidArgumentException('Missing the required parameter $marketplace_id when calling getReturnPolicies');
            Severity: Major
            Found in src/Sell/Metadata/V1/Api/MarketplaceApi.php - About 2 hrs to fix

              Method getListingStructurePoliciesRequest has 74 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function getListingStructurePoliciesRequest($marketplace_id, $filter = null)
                  {
                      // Verify the required parameter 'marketplace_id' is set.
                      if ($marketplace_id === null || (\is_array($marketplace_id) && count($marketplace_id) === 0)) {
                          throw new \InvalidArgumentException('Missing the required parameter $marketplace_id when calling getListingStructurePolicies');
              Severity: Major
              Found in src/Sell/Metadata/V1/Api/MarketplaceApi.php - About 2 hrs to fix

                Method getNegotiatedPricePoliciesRequest has 74 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function getNegotiatedPricePoliciesRequest($marketplace_id, $filter = null)
                    {
                        // Verify the required parameter 'marketplace_id' is set.
                        if ($marketplace_id === null || (\is_array($marketplace_id) && count($marketplace_id) === 0)) {
                            throw new \InvalidArgumentException('Missing the required parameter $marketplace_id when calling getNegotiatedPricePolicies');
                Severity: Major
                Found in src/Sell/Metadata/V1/Api/MarketplaceApi.php - About 2 hrs to fix

                  Function getListingStructurePoliciesRequest has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function getListingStructurePoliciesRequest($marketplace_id, $filter = null)
                      {
                          // Verify the required parameter 'marketplace_id' is set.
                          if ($marketplace_id === null || (\is_array($marketplace_id) && count($marketplace_id) === 0)) {
                              throw new \InvalidArgumentException('Missing the required parameter $marketplace_id when calling getListingStructurePolicies');
                  Severity: Minor
                  Found in src/Sell/Metadata/V1/Api/MarketplaceApi.php - About 2 hrs 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 getReturnPoliciesRequest has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function getReturnPoliciesRequest($marketplace_id, $filter = null)
                      {
                          // Verify the required parameter 'marketplace_id' is set.
                          if ($marketplace_id === null || (\is_array($marketplace_id) && count($marketplace_id) === 0)) {
                              throw new \InvalidArgumentException('Missing the required parameter $marketplace_id when calling getReturnPolicies');
                  Severity: Minor
                  Found in src/Sell/Metadata/V1/Api/MarketplaceApi.php - About 2 hrs 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 getNegotiatedPricePoliciesRequest has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function getNegotiatedPricePoliciesRequest($marketplace_id, $filter = null)
                      {
                          // Verify the required parameter 'marketplace_id' is set.
                          if ($marketplace_id === null || (\is_array($marketplace_id) && count($marketplace_id) === 0)) {
                              throw new \InvalidArgumentException('Missing the required parameter $marketplace_id when calling getNegotiatedPricePolicies');
                  Severity: Minor
                  Found in src/Sell/Metadata/V1/Api/MarketplaceApi.php - About 2 hrs 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 getItemConditionPoliciesRequest has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function getItemConditionPoliciesRequest($marketplace_id, $filter = null)
                      {
                          // Verify the required parameter 'marketplace_id' is set.
                          if ($marketplace_id === null || (\is_array($marketplace_id) && count($marketplace_id) === 0)) {
                              throw new \InvalidArgumentException('Missing the required parameter $marketplace_id when calling getItemConditionPolicies');
                  Severity: Minor
                  Found in src/Sell/Metadata/V1/Api/MarketplaceApi.php - About 2 hrs 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 getAutomotivePartsCompatibilityPoliciesRequest has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function getAutomotivePartsCompatibilityPoliciesRequest($marketplace_id, $filter = null)
                      {
                          // Verify the required parameter 'marketplace_id' is set.
                          if ($marketplace_id === null || (\is_array($marketplace_id) && count($marketplace_id) === 0)) {
                              throw new \InvalidArgumentException('Missing the required parameter $marketplace_id when calling getAutomotivePartsCompatibilityPolicies');
                  Severity: Minor
                  Found in src/Sell/Metadata/V1/Api/MarketplaceApi.php - About 2 hrs 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 getExtendedProducerResponsibilityPoliciesRequest has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function getExtendedProducerResponsibilityPoliciesRequest($marketplace_id, $filter = null)
                      {
                          // Verify the required parameter 'marketplace_id' is set.
                          if ($marketplace_id === null || (\is_array($marketplace_id) && count($marketplace_id) === 0)) {
                              throw new \InvalidArgumentException('Missing the required parameter $marketplace_id when calling getExtendedProducerResponsibilityPolicies');
                  Severity: Minor
                  Found in src/Sell/Metadata/V1/Api/MarketplaceApi.php - About 2 hrs 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 getReturnPoliciesWithHttpInfo has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function getReturnPoliciesWithHttpInfo($marketplace_id, $filter = null)
                      {
                          $request = $this->getReturnPoliciesRequest($marketplace_id, $filter);
                  
                          try {
                  Severity: Major
                  Found in src/Sell/Metadata/V1/Api/MarketplaceApi.php - About 2 hrs to fix

                    Method getItemConditionPoliciesWithHttpInfo has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function getItemConditionPoliciesWithHttpInfo($marketplace_id, $filter = null)
                        {
                            $request = $this->getItemConditionPoliciesRequest($marketplace_id, $filter);
                    
                            try {
                    Severity: Major
                    Found in src/Sell/Metadata/V1/Api/MarketplaceApi.php - About 2 hrs to fix

                      Method getNegotiatedPricePoliciesWithHttpInfo has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function getNegotiatedPricePoliciesWithHttpInfo($marketplace_id, $filter = null)
                          {
                              $request = $this->getNegotiatedPricePoliciesRequest($marketplace_id, $filter);
                      
                              try {
                      Severity: Major
                      Found in src/Sell/Metadata/V1/Api/MarketplaceApi.php - About 2 hrs to fix

                        Method getExtendedProducerResponsibilityPoliciesWithHttpInfo has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function getExtendedProducerResponsibilityPoliciesWithHttpInfo($marketplace_id, $filter = null)
                            {
                                $request = $this->getExtendedProducerResponsibilityPoliciesRequest($marketplace_id, $filter);
                        
                                try {
                        Severity: Major
                        Found in src/Sell/Metadata/V1/Api/MarketplaceApi.php - About 2 hrs to fix

                          Method getListingStructurePoliciesWithHttpInfo has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function getListingStructurePoliciesWithHttpInfo($marketplace_id, $filter = null)
                              {
                                  $request = $this->getListingStructurePoliciesRequest($marketplace_id, $filter);
                          
                                  try {
                          Severity: Major
                          Found in src/Sell/Metadata/V1/Api/MarketplaceApi.php - About 2 hrs to fix

                            Method getAutomotivePartsCompatibilityPoliciesWithHttpInfo has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function getAutomotivePartsCompatibilityPoliciesWithHttpInfo($marketplace_id, $filter = null)
                                {
                                    $request = $this->getAutomotivePartsCompatibilityPoliciesRequest($marketplace_id, $filter);
                            
                                    try {
                            Severity: Major
                            Found in src/Sell/Metadata/V1/Api/MarketplaceApi.php - About 2 hrs to fix

                              Function getReturnPoliciesWithHttpInfo has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  public function getReturnPoliciesWithHttpInfo($marketplace_id, $filter = null)
                                  {
                                      $request = $this->getReturnPoliciesRequest($marketplace_id, $filter);
                              
                                      try {
                              Severity: Minor
                              Found in src/Sell/Metadata/V1/Api/MarketplaceApi.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 getExtendedProducerResponsibilityPoliciesWithHttpInfo has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  public function getExtendedProducerResponsibilityPoliciesWithHttpInfo($marketplace_id, $filter = null)
                                  {
                                      $request = $this->getExtendedProducerResponsibilityPoliciesRequest($marketplace_id, $filter);
                              
                                      try {
                              Severity: Minor
                              Found in src/Sell/Metadata/V1/Api/MarketplaceApi.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 getItemConditionPoliciesWithHttpInfo has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  public function getItemConditionPoliciesWithHttpInfo($marketplace_id, $filter = null)
                                  {
                                      $request = $this->getItemConditionPoliciesRequest($marketplace_id, $filter);
                              
                                      try {
                              Severity: Minor
                              Found in src/Sell/Metadata/V1/Api/MarketplaceApi.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 getAutomotivePartsCompatibilityPoliciesWithHttpInfo has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  public function getAutomotivePartsCompatibilityPoliciesWithHttpInfo($marketplace_id, $filter = null)
                                  {
                                      $request = $this->getAutomotivePartsCompatibilityPoliciesRequest($marketplace_id, $filter);
                              
                                      try {
                              Severity: Minor
                              Found in src/Sell/Metadata/V1/Api/MarketplaceApi.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 getListingStructurePoliciesWithHttpInfo has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  public function getListingStructurePoliciesWithHttpInfo($marketplace_id, $filter = null)
                                  {
                                      $request = $this->getListingStructurePoliciesRequest($marketplace_id, $filter);
                              
                                      try {
                              Severity: Minor
                              Found in src/Sell/Metadata/V1/Api/MarketplaceApi.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 getNegotiatedPricePoliciesWithHttpInfo has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  public function getNegotiatedPricePoliciesWithHttpInfo($marketplace_id, $filter = null)
                                  {
                                      $request = $this->getNegotiatedPricePoliciesRequest($marketplace_id, $filter);
                              
                                      try {
                              Severity: Minor
                              Found in src/Sell/Metadata/V1/Api/MarketplaceApi.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

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

                                  public function getItemConditionPoliciesRequest($marketplace_id, $filter = null)
                                  {
                                      // Verify the required parameter 'marketplace_id' is set.
                                      if ($marketplace_id === null || (\is_array($marketplace_id) && count($marketplace_id) === 0)) {
                                          throw new \InvalidArgumentException('Missing the required parameter $marketplace_id when calling getItemConditionPolicies');
                              Severity: Major
                              Found in src/Sell/Metadata/V1/Api/MarketplaceApi.php and 6 other locations - About 2 days to fix
                              src/Buy/Browse/V1/Api/ItemApi.php on lines 593..689
                              src/Sell/Metadata/V1/Api/MarketplaceApi.php on lines 318..414
                              src/Sell/Metadata/V1/Api/MarketplaceApi.php on lines 582..678
                              src/Sell/Metadata/V1/Api/MarketplaceApi.php on lines 1110..1206
                              src/Sell/Metadata/V1/Api/MarketplaceApi.php on lines 1374..1470
                              src/Sell/Metadata/V1/Api/MarketplaceApi.php on lines 1638..1734

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

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

                                  public function getAutomotivePartsCompatibilityPoliciesRequest($marketplace_id, $filter = null)
                                  {
                                      // Verify the required parameter 'marketplace_id' is set.
                                      if ($marketplace_id === null || (\is_array($marketplace_id) && count($marketplace_id) === 0)) {
                                          throw new \InvalidArgumentException('Missing the required parameter $marketplace_id when calling getAutomotivePartsCompatibilityPolicies');
                              Severity: Major
                              Found in src/Sell/Metadata/V1/Api/MarketplaceApi.php and 6 other locations - About 2 days to fix
                              src/Buy/Browse/V1/Api/ItemApi.php on lines 593..689
                              src/Sell/Metadata/V1/Api/MarketplaceApi.php on lines 582..678
                              src/Sell/Metadata/V1/Api/MarketplaceApi.php on lines 846..942
                              src/Sell/Metadata/V1/Api/MarketplaceApi.php on lines 1110..1206
                              src/Sell/Metadata/V1/Api/MarketplaceApi.php on lines 1374..1470
                              src/Sell/Metadata/V1/Api/MarketplaceApi.php on lines 1638..1734

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

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

                                  public function getReturnPoliciesRequest($marketplace_id, $filter = null)
                                  {
                                      // Verify the required parameter 'marketplace_id' is set.
                                      if ($marketplace_id === null || (\is_array($marketplace_id) && count($marketplace_id) === 0)) {
                                          throw new \InvalidArgumentException('Missing the required parameter $marketplace_id when calling getReturnPolicies');
                              Severity: Major
                              Found in src/Sell/Metadata/V1/Api/MarketplaceApi.php and 6 other locations - About 2 days to fix
                              src/Buy/Browse/V1/Api/ItemApi.php on lines 593..689
                              src/Sell/Metadata/V1/Api/MarketplaceApi.php on lines 318..414
                              src/Sell/Metadata/V1/Api/MarketplaceApi.php on lines 582..678
                              src/Sell/Metadata/V1/Api/MarketplaceApi.php on lines 846..942
                              src/Sell/Metadata/V1/Api/MarketplaceApi.php on lines 1110..1206
                              src/Sell/Metadata/V1/Api/MarketplaceApi.php on lines 1374..1470

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

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

                                  public function getNegotiatedPricePoliciesRequest($marketplace_id, $filter = null)
                                  {
                                      // Verify the required parameter 'marketplace_id' is set.
                                      if ($marketplace_id === null || (\is_array($marketplace_id) && count($marketplace_id) === 0)) {
                                          throw new \InvalidArgumentException('Missing the required parameter $marketplace_id when calling getNegotiatedPricePolicies');
                              Severity: Major
                              Found in src/Sell/Metadata/V1/Api/MarketplaceApi.php and 6 other locations - About 2 days to fix
                              src/Buy/Browse/V1/Api/ItemApi.php on lines 593..689
                              src/Sell/Metadata/V1/Api/MarketplaceApi.php on lines 318..414
                              src/Sell/Metadata/V1/Api/MarketplaceApi.php on lines 582..678
                              src/Sell/Metadata/V1/Api/MarketplaceApi.php on lines 846..942
                              src/Sell/Metadata/V1/Api/MarketplaceApi.php on lines 1110..1206
                              src/Sell/Metadata/V1/Api/MarketplaceApi.php on lines 1638..1734

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

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

                                  public function getExtendedProducerResponsibilityPoliciesRequest($marketplace_id, $filter = null)
                                  {
                                      // Verify the required parameter 'marketplace_id' is set.
                                      if ($marketplace_id === null || (\is_array($marketplace_id) && count($marketplace_id) === 0)) {
                                          throw new \InvalidArgumentException('Missing the required parameter $marketplace_id when calling getExtendedProducerResponsibilityPolicies');
                              Severity: Major
                              Found in src/Sell/Metadata/V1/Api/MarketplaceApi.php and 6 other locations - About 2 days to fix
                              src/Buy/Browse/V1/Api/ItemApi.php on lines 593..689
                              src/Sell/Metadata/V1/Api/MarketplaceApi.php on lines 318..414
                              src/Sell/Metadata/V1/Api/MarketplaceApi.php on lines 846..942
                              src/Sell/Metadata/V1/Api/MarketplaceApi.php on lines 1110..1206
                              src/Sell/Metadata/V1/Api/MarketplaceApi.php on lines 1374..1470
                              src/Sell/Metadata/V1/Api/MarketplaceApi.php on lines 1638..1734

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

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

                                  public function getListingStructurePoliciesRequest($marketplace_id, $filter = null)
                                  {
                                      // Verify the required parameter 'marketplace_id' is set.
                                      if ($marketplace_id === null || (\is_array($marketplace_id) && count($marketplace_id) === 0)) {
                                          throw new \InvalidArgumentException('Missing the required parameter $marketplace_id when calling getListingStructurePolicies');
                              Severity: Major
                              Found in src/Sell/Metadata/V1/Api/MarketplaceApi.php and 6 other locations - About 2 days to fix
                              src/Buy/Browse/V1/Api/ItemApi.php on lines 593..689
                              src/Sell/Metadata/V1/Api/MarketplaceApi.php on lines 318..414
                              src/Sell/Metadata/V1/Api/MarketplaceApi.php on lines 582..678
                              src/Sell/Metadata/V1/Api/MarketplaceApi.php on lines 846..942
                              src/Sell/Metadata/V1/Api/MarketplaceApi.php on lines 1374..1470
                              src/Sell/Metadata/V1/Api/MarketplaceApi.php on lines 1638..1734

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

                              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