brandon14/ebay-sdk-php

View on GitHub
src/Sell/Marketing/V1/Api/KeywordApi.php

Summary

Maintainability
F
3 wks
Test Coverage

File KeywordApi.php has 1095 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/Marketing/V1/Api/KeywordApi.php - About 2 days to fix

    Function updateKeywordRequest has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
    Open

        public function updateKeywordRequest($campaign_id, $keyword_id, $update_keyword_request)
        {
            // Verify the required parameter 'campaign_id' is set.
            if ($campaign_id === null || (\is_array($campaign_id) && count($campaign_id) === 0)) {
                throw new \InvalidArgumentException('Missing the required parameter $campaign_id when calling updateKeyword');
    Severity: Minor
    Found in src/Sell/Marketing/V1/Api/KeywordApi.php - About 4 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

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

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

      Function bulkUpdateKeywordRequest has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
      Open

          public function bulkUpdateKeywordRequest($campaign_id, $bulk_update_keyword_request)
          {
              // Verify the required parameter 'campaign_id' is set.
              if ($campaign_id === null || (\is_array($campaign_id) && count($campaign_id) === 0)) {
                  throw new \InvalidArgumentException('Missing the required parameter $campaign_id when calling bulkUpdateKeyword');
      Severity: Minor
      Found in src/Sell/Marketing/V1/Api/KeywordApi.php - About 4 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 createKeywordRequest has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
      Open

          public function createKeywordRequest($campaign_id, $create_keyword_request)
          {
              // Verify the required parameter 'campaign_id' is set.
              if ($campaign_id === null || (\is_array($campaign_id) && count($campaign_id) === 0)) {
                  throw new \InvalidArgumentException('Missing the required parameter $campaign_id when calling createKeyword');
      Severity: Minor
      Found in src/Sell/Marketing/V1/Api/KeywordApi.php - About 4 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 bulkCreateKeywordRequest has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
      Open

          public function bulkCreateKeywordRequest($campaign_id, $bulk_create_keyword_request)
          {
              // Verify the required parameter 'campaign_id' is set.
              if ($campaign_id === null || (\is_array($campaign_id) && count($campaign_id) === 0)) {
                  throw new \InvalidArgumentException('Missing the required parameter $campaign_id when calling bulkCreateKeyword');
      Severity: Minor
      Found in src/Sell/Marketing/V1/Api/KeywordApi.php - About 4 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 getKeywordsRequest has 95 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function getKeywordsRequest($campaign_id, $ad_group_ids = null, $keyword_status = null, $limit = null, $offset = null)
          {
              // Verify the required parameter 'campaign_id' is set.
              if ($campaign_id === null || (\is_array($campaign_id) && count($campaign_id) === 0)) {
                  throw new \InvalidArgumentException('Missing the required parameter $campaign_id when calling getKeywords');
      Severity: Major
      Found in src/Sell/Marketing/V1/Api/KeywordApi.php - About 3 hrs to fix

        Function getKeywordRequest has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
        Open

            public function getKeywordRequest($campaign_id, $keyword_id)
            {
                // Verify the required parameter 'campaign_id' is set.
                if ($campaign_id === null || (\is_array($campaign_id) && count($campaign_id) === 0)) {
                    throw new \InvalidArgumentException('Missing the required parameter $campaign_id when calling getKeyword');
        Severity: Minor
        Found in src/Sell/Marketing/V1/Api/KeywordApi.php - About 3 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 updateKeywordRequest has 86 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function updateKeywordRequest($campaign_id, $keyword_id, $update_keyword_request)
            {
                // Verify the required parameter 'campaign_id' is set.
                if ($campaign_id === null || (\is_array($campaign_id) && count($campaign_id) === 0)) {
                    throw new \InvalidArgumentException('Missing the required parameter $campaign_id when calling updateKeyword');
        Severity: Major
        Found in src/Sell/Marketing/V1/Api/KeywordApi.php - About 3 hrs to fix

          Method getKeywordRequest has 77 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function getKeywordRequest($campaign_id, $keyword_id)
              {
                  // Verify the required parameter 'campaign_id' is set.
                  if ($campaign_id === null || (\is_array($campaign_id) && count($campaign_id) === 0)) {
                      throw new \InvalidArgumentException('Missing the required parameter $campaign_id when calling getKeyword');
          Severity: Major
          Found in src/Sell/Marketing/V1/Api/KeywordApi.php - About 3 hrs to fix

            Method bulkUpdateKeywordRequest has 76 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function bulkUpdateKeywordRequest($campaign_id, $bulk_update_keyword_request)
                {
                    // Verify the required parameter 'campaign_id' is set.
                    if ($campaign_id === null || (\is_array($campaign_id) && count($campaign_id) === 0)) {
                        throw new \InvalidArgumentException('Missing the required parameter $campaign_id when calling bulkUpdateKeyword');
            Severity: Major
            Found in src/Sell/Marketing/V1/Api/KeywordApi.php - About 3 hrs to fix

              Method createKeywordRequest has 76 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function createKeywordRequest($campaign_id, $create_keyword_request)
                  {
                      // Verify the required parameter 'campaign_id' is set.
                      if ($campaign_id === null || (\is_array($campaign_id) && count($campaign_id) === 0)) {
                          throw new \InvalidArgumentException('Missing the required parameter $campaign_id when calling createKeyword');
              Severity: Major
              Found in src/Sell/Marketing/V1/Api/KeywordApi.php - About 3 hrs to fix

                Method bulkCreateKeywordRequest has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function bulkCreateKeywordRequest($campaign_id, $bulk_create_keyword_request)
                    {
                        // Verify the required parameter 'campaign_id' is set.
                        if ($campaign_id === null || (\is_array($campaign_id) && count($campaign_id) === 0)) {
                            throw new \InvalidArgumentException('Missing the required parameter $campaign_id when calling bulkCreateKeyword');
                Severity: Major
                Found in src/Sell/Marketing/V1/Api/KeywordApi.php - About 3 hrs to fix

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

                      public function getKeywordsRequest($campaign_id, $ad_group_ids = null, $keyword_status = null, $limit = null, $offset = null)
                      {
                          // Verify the required parameter 'campaign_id' is set.
                          if ($campaign_id === null || (\is_array($campaign_id) && count($campaign_id) === 0)) {
                              throw new \InvalidArgumentException('Missing the required parameter $campaign_id when calling getKeywords');
                  Severity: Minor
                  Found in src/Sell/Marketing/V1/Api/KeywordApi.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 createKeywordWithHttpInfo has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function createKeywordWithHttpInfo($campaign_id, $create_keyword_request)
                      {
                          $request = $this->createKeywordRequest($campaign_id, $create_keyword_request);
                  
                          try {
                  Severity: Major
                  Found in src/Sell/Marketing/V1/Api/KeywordApi.php - About 2 hrs to fix

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

                        public function getKeywordWithHttpInfo($campaign_id, $keyword_id)
                        {
                            $request = $this->getKeywordRequest($campaign_id, $keyword_id);
                    
                            try {
                    Severity: Major
                    Found in src/Sell/Marketing/V1/Api/KeywordApi.php - About 2 hrs to fix

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

                          public function bulkUpdateKeywordWithHttpInfo($campaign_id, $bulk_update_keyword_request)
                          {
                              $request = $this->bulkUpdateKeywordRequest($campaign_id, $bulk_update_keyword_request);
                      
                              try {
                      Severity: Major
                      Found in src/Sell/Marketing/V1/Api/KeywordApi.php - About 2 hrs to fix

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

                            public function getKeywordsWithHttpInfo($campaign_id, $ad_group_ids = null, $keyword_status = null, $limit = null, $offset = null)
                            {
                                $request = $this->getKeywordsRequest($campaign_id, $ad_group_ids, $keyword_status, $limit, $offset);
                        
                                try {
                        Severity: Major
                        Found in src/Sell/Marketing/V1/Api/KeywordApi.php - About 2 hrs to fix

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

                              public function bulkCreateKeywordWithHttpInfo($campaign_id, $bulk_create_keyword_request)
                              {
                                  $request = $this->bulkCreateKeywordRequest($campaign_id, $bulk_create_keyword_request);
                          
                                  try {
                          Severity: Major
                          Found in src/Sell/Marketing/V1/Api/KeywordApi.php - About 2 hrs to fix

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

                                public function getKeywordsWithHttpInfo($campaign_id, $ad_group_ids = null, $keyword_status = null, $limit = null, $offset = null)
                                {
                                    $request = $this->getKeywordsRequest($campaign_id, $ad_group_ids, $keyword_status, $limit, $offset);
                            
                                    try {
                            Severity: Minor
                            Found in src/Sell/Marketing/V1/Api/KeywordApi.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 createKeywordWithHttpInfo has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                            Open

                                public function createKeywordWithHttpInfo($campaign_id, $create_keyword_request)
                                {
                                    $request = $this->createKeywordRequest($campaign_id, $create_keyword_request);
                            
                                    try {
                            Severity: Minor
                            Found in src/Sell/Marketing/V1/Api/KeywordApi.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 getKeywordWithHttpInfo has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                            Open

                                public function getKeywordWithHttpInfo($campaign_id, $keyword_id)
                                {
                                    $request = $this->getKeywordRequest($campaign_id, $keyword_id);
                            
                                    try {
                            Severity: Minor
                            Found in src/Sell/Marketing/V1/Api/KeywordApi.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 bulkCreateKeywordWithHttpInfo has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                            Open

                                public function bulkCreateKeywordWithHttpInfo($campaign_id, $bulk_create_keyword_request)
                                {
                                    $request = $this->bulkCreateKeywordRequest($campaign_id, $bulk_create_keyword_request);
                            
                                    try {
                            Severity: Minor
                            Found in src/Sell/Marketing/V1/Api/KeywordApi.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 bulkUpdateKeywordWithHttpInfo has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                            Open

                                public function bulkUpdateKeywordWithHttpInfo($campaign_id, $bulk_update_keyword_request)
                                {
                                    $request = $this->bulkUpdateKeywordRequest($campaign_id, $bulk_update_keyword_request);
                            
                                    try {
                            Severity: Minor
                            Found in src/Sell/Marketing/V1/Api/KeywordApi.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 getKeywordsAsync has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                public function getKeywordsAsync($campaign_id, $ad_group_ids = null, $keyword_status = null, $limit = null, $offset = null)
                            Severity: Minor
                            Found in src/Sell/Marketing/V1/Api/KeywordApi.php - About 35 mins to fix

                              Method getKeywordsRequest has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                  public function getKeywordsRequest($campaign_id, $ad_group_ids = null, $keyword_status = null, $limit = null, $offset = null)
                              Severity: Minor
                              Found in src/Sell/Marketing/V1/Api/KeywordApi.php - About 35 mins to fix

                                Method getKeywords has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                    public function getKeywords($campaign_id, $ad_group_ids = null, $keyword_status = null, $limit = null, $offset = null)
                                Severity: Minor
                                Found in src/Sell/Marketing/V1/Api/KeywordApi.php - About 35 mins to fix

                                  Method getKeywordsAsyncWithHttpInfo has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                      public function getKeywordsAsyncWithHttpInfo($campaign_id, $ad_group_ids = null, $keyword_status = null, $limit = null, $offset = null)
                                  Severity: Minor
                                  Found in src/Sell/Marketing/V1/Api/KeywordApi.php - About 35 mins to fix

                                    Method getKeywordsWithHttpInfo has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                        public function getKeywordsWithHttpInfo($campaign_id, $ad_group_ids = null, $keyword_status = null, $limit = null, $offset = null)
                                    Severity: Minor
                                    Found in src/Sell/Marketing/V1/Api/KeywordApi.php - About 35 mins to fix

                                      Function updateKeywordWithHttpInfo has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                          public function updateKeywordWithHttpInfo($campaign_id, $keyword_id, $update_keyword_request)
                                          {
                                              $request = $this->updateKeywordRequest($campaign_id, $keyword_id, $update_keyword_request);
                                      
                                              try {
                                      Severity: Minor
                                      Found in src/Sell/Marketing/V1/Api/KeywordApi.php - About 35 mins 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 4 locations. Consider refactoring.
                                      Open

                                          public function updateKeywordRequest($campaign_id, $keyword_id, $update_keyword_request)
                                          {
                                              // Verify the required parameter 'campaign_id' is set.
                                              if ($campaign_id === null || (\is_array($campaign_id) && count($campaign_id) === 0)) {
                                                  throw new \InvalidArgumentException('Missing the required parameter $campaign_id when calling updateKeyword');
                                      Severity: Major
                                      Found in src/Sell/Marketing/V1/Api/KeywordApi.php and 3 other locations - About 3 days to fix
                                      src/Sell/Account/V1/Api/SalesTaxApi.php on lines 276..385
                                      src/Sell/Marketing/V1/Api/AdApi.php on lines 4279..4388
                                      src/Sell/Marketing/V1/Api/AdGroupApi.php on lines 1658..1767

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

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

                                          public function getKeywordsWithHttpInfo($campaign_id, $ad_group_ids = null, $keyword_status = null, $limit = null, $offset = null)
                                          {
                                              $request = $this->getKeywordsRequest($campaign_id, $ad_group_ids, $keyword_status, $limit, $offset);
                                      
                                              try {
                                      Severity: Major
                                      Found in src/Sell/Marketing/V1/Api/KeywordApi.php and 2 other locations - About 2 days to fix
                                      src/Commerce/Charity/V1/Api/CharityOrgApi.php on lines 707..772
                                      src/Sell/Recommendation/V1/Api/ListingRecommendationApi.php on lines 187..252

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

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

                                          public function updateKeywordWithHttpInfo($campaign_id, $keyword_id, $update_keyword_request)
                                          {
                                              $request = $this->updateKeywordRequest($campaign_id, $keyword_id, $update_keyword_request);
                                      
                                              try {
                                      Severity: Major
                                      Found in src/Sell/Marketing/V1/Api/KeywordApi.php and 4 other locations - About 1 day to fix
                                      src/Sell/Account/V1/Api/CustomPolicyApi.php on lines 966..996
                                      src/Sell/Account/V1/Api/SalesTaxApi.php on lines 181..211
                                      src/Sell/Marketing/V1/Api/AdApi.php on lines 4184..4214
                                      src/Sell/Marketing/V1/Api/AdGroupApi.php on lines 1563..1593

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

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

                                          public function getKeywordsAsyncWithHttpInfo($campaign_id, $ad_group_ids = null, $keyword_status = null, $limit = null, $offset = null)
                                          {
                                              $returnType = '\TNT\Ebay\Sell\Marketing\V1\Model\KeywordPagedCollectionResponse';
                                              $request = $this->getKeywordsRequest($campaign_id, $ad_group_ids, $keyword_status, $limit, $offset);
                                      
                                      
                                      Severity: Major
                                      Found in src/Sell/Marketing/V1/Api/KeywordApi.php and 2 other locations - About 1 day to fix
                                      src/Commerce/Charity/V1/Api/CharityOrgApi.php on lines 810..838
                                      src/Sell/Recommendation/V1/Api/ListingRecommendationApi.php on lines 290..318

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

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

                                          public function updateKeywordAsyncWithHttpInfo($campaign_id, $keyword_id, $update_keyword_request)
                                          {
                                              $returnType = '';
                                              $request = $this->updateKeywordRequest($campaign_id, $keyword_id, $update_keyword_request);
                                      
                                      
                                      Severity: Major
                                      Found in src/Sell/Marketing/V1/Api/KeywordApi.php and 4 other locations - About 5 hrs to fix
                                      src/Sell/Account/V1/Api/CustomPolicyApi.php on lines 1030..1048
                                      src/Sell/Account/V1/Api/SalesTaxApi.php on lines 245..263
                                      src/Sell/Marketing/V1/Api/AdApi.php on lines 4248..4266
                                      src/Sell/Marketing/V1/Api/AdGroupApi.php on lines 1627..1645

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

                                      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