brandon14/ebay-sdk-php

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

Summary

Maintainability
F
1 mo
Test Coverage

File AdGroupApi.php has 1105 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/AdGroupApi.php - About 2 days to fix

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

        public function suggestBidsRequest($ad_group_id, $campaign_id, $targeted_bid_request)
        {
            // Verify the required parameter 'ad_group_id' is set.
            if ($ad_group_id === null || (\is_array($ad_group_id) && count($ad_group_id) === 0)) {
                throw new \InvalidArgumentException('Missing the required parameter $ad_group_id when calling suggestBids');
    Severity: Minor
    Found in src/Sell/Marketing/V1/Api/AdGroupApi.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 updateAdGroupRequest has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
    Open

        public function updateAdGroupRequest($ad_group_id, $campaign_id, $update_ad_group_request)
        {
            // Verify the required parameter 'ad_group_id' is set.
            if ($ad_group_id === null || (\is_array($ad_group_id) && count($ad_group_id) === 0)) {
                throw new \InvalidArgumentException('Missing the required parameter $ad_group_id when calling updateAdGroup');
    Severity: Minor
    Found in src/Sell/Marketing/V1/Api/AdGroupApi.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

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

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

      Function suggestKeywordsRequest has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
      Open

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

          public function createAdGroupRequest($campaign_id, $create_ad_group_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 createAdGroup');
      Severity: Minor
      Found in src/Sell/Marketing/V1/Api/AdGroupApi.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 getAdGroupRequest has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
      Open

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

          public function getAdGroupsRequest($campaign_id, $ad_group_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 getAdGroups');
      Severity: Major
      Found in src/Sell/Marketing/V1/Api/AdGroupApi.php - About 3 hrs to fix

        Method suggestBidsRequest has 86 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

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

          Method updateAdGroupRequest has 86 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

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

            Method suggestKeywordsRequest has 83 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

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

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

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

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

                    public function createAdGroupRequest($campaign_id, $create_ad_group_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 createAdGroup');
                Severity: Major
                Found in src/Sell/Marketing/V1/Api/AdGroupApi.php - About 3 hrs to fix

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

                      public function getAdGroupsRequest($campaign_id, $ad_group_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 getAdGroups');
                  Severity: Minor
                  Found in src/Sell/Marketing/V1/Api/AdGroupApi.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 suggestBidsWithHttpInfo has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function suggestBidsWithHttpInfo($ad_group_id, $campaign_id, $targeted_bid_request)
                      {
                          $request = $this->suggestBidsRequest($ad_group_id, $campaign_id, $targeted_bid_request);
                  
                          try {
                  Severity: Major
                  Found in src/Sell/Marketing/V1/Api/AdGroupApi.php - About 2 hrs to fix

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

                        public function suggestKeywordsWithHttpInfo($ad_group_id, $campaign_id, $targeted_keyword_request = null)
                        {
                            $request = $this->suggestKeywordsRequest($ad_group_id, $campaign_id, $targeted_keyword_request);
                    
                            try {
                    Severity: Major
                    Found in src/Sell/Marketing/V1/Api/AdGroupApi.php - About 2 hrs to fix

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

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

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

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

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

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

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

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

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

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

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

                                public function suggestKeywordsWithHttpInfo($ad_group_id, $campaign_id, $targeted_keyword_request = null)
                                {
                                    $request = $this->suggestKeywordsRequest($ad_group_id, $campaign_id, $targeted_keyword_request);
                            
                                    try {
                            Severity: Minor
                            Found in src/Sell/Marketing/V1/Api/AdGroupApi.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 updateAdGroupWithHttpInfo has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                            Open

                                public function updateAdGroupWithHttpInfo($ad_group_id, $campaign_id, $update_ad_group_request)
                                {
                                    $request = $this->updateAdGroupRequest($ad_group_id, $campaign_id, $update_ad_group_request);
                            
                                    try {
                            Severity: Minor
                            Found in src/Sell/Marketing/V1/Api/AdGroupApi.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 updateAdGroupRequest($ad_group_id, $campaign_id, $update_ad_group_request)
                                {
                                    // Verify the required parameter 'ad_group_id' is set.
                                    if ($ad_group_id === null || (\is_array($ad_group_id) && count($ad_group_id) === 0)) {
                                        throw new \InvalidArgumentException('Missing the required parameter $ad_group_id when calling updateAdGroup');
                            Severity: Major
                            Found in src/Sell/Marketing/V1/Api/AdGroupApi.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/KeywordApi.php on lines 1641..1750

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

                                public function getAdGroupsRequest($campaign_id, $ad_group_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 getAdGroups');
                            Severity: Major
                            Found in src/Sell/Marketing/V1/Api/AdGroupApi.php and 1 other location - About 3 days to fix
                            src/Sell/Marketing/V1/Api/CampaignApi.php on lines 2746..2858

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

                            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 getAdGroupsWithHttpInfo($campaign_id, $ad_group_status = null, $limit = null, $offset = null)
                                {
                                    $request = $this->getAdGroupsRequest($campaign_id, $ad_group_status, $limit, $offset);
                            
                                    try {
                            Severity: Major
                            Found in src/Sell/Marketing/V1/Api/AdGroupApi.php and 2 other locations - About 2 days to fix
                            src/Buy/Browse/V1/Api/ItemApi.php on lines 724..789
                            src/Sell/Marketing/V1/Api/CampaignApi.php on lines 2603..2668

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

                            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

                                public function suggestKeywordsWithHttpInfo($ad_group_id, $campaign_id, $targeted_keyword_request = null)
                                {
                                    $request = $this->suggestKeywordsRequest($ad_group_id, $campaign_id, $targeted_keyword_request);
                            
                                    try {
                            Severity: Major
                            Found in src/Sell/Marketing/V1/Api/AdGroupApi.php and 7 other locations - About 2 days to fix
                            src/Buy/Browse/V1/Api/ItemApi.php on lines 183..248
                            src/Buy/OfferBeta/V1/Api/BiddingApi.php on lines 443..508
                            src/Buy/Order/V2/Api/GuestCheckoutSessionApi.php on lines 183..248
                            src/Buy/Order/V2/Api/GuestCheckoutSessionApi.php on lines 976..1041
                            src/Buy/Order/V2/Api/GuestCheckoutSessionApi.php on lines 1247..1312
                            src/Buy/Order/V2/Api/GuestCheckoutSessionApi.php on lines 1518..1583
                            src/Buy/Order/V2/Api/GuestCheckoutSessionApi.php on lines 1789..1854

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

                            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 suggestBidsWithHttpInfo($ad_group_id, $campaign_id, $targeted_bid_request)
                                {
                                    $request = $this->suggestBidsRequest($ad_group_id, $campaign_id, $targeted_bid_request);
                            
                                    try {
                            Severity: Major
                            Found in src/Sell/Marketing/V1/Api/AdGroupApi.php and 4 other locations - About 2 days to fix
                            src/Sell/Analytics/V1/Api/CustomerServiceMetricApi.php on lines 183..248
                            src/Sell/Fulfillment/V1/Api/PaymentDisputeApi.php on lines 960..1025
                            src/Sell/Inventory/V1/Api/OfferApi.php on lines 2391..2456
                            src/Sell/Marketing/V1/Api/AdApi.php on lines 3901..3966

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

                            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 updateAdGroupWithHttpInfo($ad_group_id, $campaign_id, $update_ad_group_request)
                                {
                                    $request = $this->updateAdGroupRequest($ad_group_id, $campaign_id, $update_ad_group_request);
                            
                                    try {
                            Severity: Major
                            Found in src/Sell/Marketing/V1/Api/AdGroupApi.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/KeywordApi.php on lines 1546..1576

                            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 getAdGroupsAsyncWithHttpInfo($campaign_id, $ad_group_status = null, $limit = null, $offset = null)
                                {
                                    $returnType = '\TNT\Ebay\Sell\Marketing\V1\Model\AdGroupPagedCollectionResponse';
                                    $request = $this->getAdGroupsRequest($campaign_id, $ad_group_status, $limit, $offset);
                            
                            
                            Severity: Major
                            Found in src/Sell/Marketing/V1/Api/AdGroupApi.php and 2 other locations - About 1 day to fix
                            src/Buy/Browse/V1/Api/ItemApi.php on lines 825..853
                            src/Sell/Marketing/V1/Api/CampaignApi.php on lines 2704..2732

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

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

                                public function suggestKeywordsAsyncWithHttpInfo($ad_group_id, $campaign_id, $targeted_keyword_request = null)
                                {
                                    $returnType = '\TNT\Ebay\Sell\Marketing\V1\Model\TargetedKeywordsPagedCollection';
                                    $request = $this->suggestKeywordsRequest($ad_group_id, $campaign_id, $targeted_keyword_request);
                            
                            
                            Severity: Major
                            Found in src/Sell/Marketing/V1/Api/AdGroupApi.php and 8 other locations - About 7 hrs to fix
                            src/Buy/Browse/V1/Api/ItemApi.php on lines 282..310
                            src/Buy/Feed/V1/Api/FileApi.php on lines 302..330
                            src/Buy/OfferBeta/V1/Api/BiddingApi.php on lines 542..570
                            src/Buy/Order/V2/Api/GuestCheckoutSessionApi.php on lines 282..310
                            src/Buy/Order/V2/Api/GuestCheckoutSessionApi.php on lines 1075..1103
                            src/Buy/Order/V2/Api/GuestCheckoutSessionApi.php on lines 1346..1374
                            src/Buy/Order/V2/Api/GuestCheckoutSessionApi.php on lines 1617..1645
                            src/Buy/Order/V2/Api/GuestCheckoutSessionApi.php on lines 1888..1916

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

                            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 updateAdGroupAsyncWithHttpInfo($ad_group_id, $campaign_id, $update_ad_group_request)
                                {
                                    $returnType = '';
                                    $request = $this->updateAdGroupRequest($ad_group_id, $campaign_id, $update_ad_group_request);
                            
                            
                            Severity: Major
                            Found in src/Sell/Marketing/V1/Api/AdGroupApi.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/KeywordApi.php on lines 1610..1628

                            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