brandon14/ebay-sdk-php

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

Summary

Maintainability
F
2 mos
Test Coverage

File CampaignApi.php has 2199 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/CampaignApi.php - About 6 days to fix

    CampaignApi has 75 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class CampaignApi
    {
        /**
         * @var ClientInterface
         */
    Severity: Major
    Found in src/Sell/Marketing/V1/Api/CampaignApi.php - About 1 day to fix

      Method getCampaignsRequest has 106 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function getCampaignsRequest($campaign_name = null, $campaign_status = null, $end_date_range = null, $funding_strategy = null, $limit = null, $offset = null, $start_date_range = null)
          {
              $resourcePath = '/ad_campaign';
              $formParams = [];
              $queryParams = [];
      Severity: Major
      Found in src/Sell/Marketing/V1/Api/CampaignApi.php - About 4 hrs to fix

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

            public function updateCampaignBudgetRequest($campaign_id, $update_campaign_budget_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 updateCampaignBudget');
        Severity: Minor
        Found in src/Sell/Marketing/V1/Api/CampaignApi.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 cloneCampaignRequest has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
        Open

            public function cloneCampaignRequest($campaign_id, $clone_campaign_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 cloneCampaign');
        Severity: Minor
        Found in src/Sell/Marketing/V1/Api/CampaignApi.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 updateCampaignIdentificationRequest has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
        Open

            public function updateCampaignIdentificationRequest($campaign_id, $update_campaign_identification_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 updateCampaignIdentification');
        Severity: Minor
        Found in src/Sell/Marketing/V1/Api/CampaignApi.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 updateAdRateStrategyRequest has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
        Open

            public function updateAdRateStrategyRequest($campaign_id, $update_adrate_strategy_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 updateAdRateStrategy');
        Severity: Minor
        Found in src/Sell/Marketing/V1/Api/CampaignApi.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 suggestItemsRequest has 88 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function suggestItemsRequest($campaign_id, $category_ids = 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 suggestItems');
        Severity: Major
        Found in src/Sell/Marketing/V1/Api/CampaignApi.php - About 3 hrs to fix

          Function createCampaignRequest has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
          Open

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

              public function findCampaignByAdReferenceRequest($inventory_reference_id = null, $inventory_reference_type = null, $listing_id = null)
              {
                  $resourcePath = '/ad_campaign/find_campaign_by_ad_reference';
                  $formParams = [];
                  $queryParams = [];
          Severity: Major
          Found in src/Sell/Marketing/V1/Api/CampaignApi.php - About 3 hrs to fix

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

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

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

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

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

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

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

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

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

                        public function endCampaignRequest($campaign_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 endCampaign');
                    Severity: Minor
                    Found in src/Sell/Marketing/V1/Api/CampaignApi.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 suggestItemsRequest has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public function suggestItemsRequest($campaign_id, $category_ids = 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 suggestItems');
                    Severity: Minor
                    Found in src/Sell/Marketing/V1/Api/CampaignApi.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 getCampaignRequest has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public function getCampaignRequest($campaign_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 getCampaign');
                    Severity: Minor
                    Found in src/Sell/Marketing/V1/Api/CampaignApi.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 pauseCampaignRequest has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public function pauseCampaignRequest($campaign_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 pauseCampaign');
                    Severity: Minor
                    Found in src/Sell/Marketing/V1/Api/CampaignApi.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 resumeCampaignRequest has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public function resumeCampaignRequest($campaign_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 resumeCampaign');
                    Severity: Minor
                    Found in src/Sell/Marketing/V1/Api/CampaignApi.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 deleteCampaignRequest has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public function deleteCampaignRequest($campaign_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 deleteCampaign');
                    Severity: Minor
                    Found in src/Sell/Marketing/V1/Api/CampaignApi.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 getCampaignByNameRequest has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                    Open

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

                        public function resumeCampaignRequest($campaign_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 resumeCampaign');
                    Severity: Major
                    Found in src/Sell/Marketing/V1/Api/CampaignApi.php - About 2 hrs to fix

                      Method getCampaignRequest has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function getCampaignRequest($campaign_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 getCampaign');
                      Severity: Major
                      Found in src/Sell/Marketing/V1/Api/CampaignApi.php - About 2 hrs to fix

                        Method deleteCampaignRequest has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function deleteCampaignRequest($campaign_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 deleteCampaign');
                        Severity: Major
                        Found in src/Sell/Marketing/V1/Api/CampaignApi.php - About 2 hrs to fix

                          Method getCampaignByNameRequest has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function getCampaignByNameRequest($campaign_name)
                              {
                                  // Verify the required parameter 'campaign_name' is set.
                                  if ($campaign_name === null || (\is_array($campaign_name) && count($campaign_name) === 0)) {
                                      throw new \InvalidArgumentException('Missing the required parameter $campaign_name when calling getCampaignByName');
                          Severity: Major
                          Found in src/Sell/Marketing/V1/Api/CampaignApi.php - About 2 hrs to fix

                            Method pauseCampaignRequest has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function pauseCampaignRequest($campaign_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 pauseCampaign');
                            Severity: Major
                            Found in src/Sell/Marketing/V1/Api/CampaignApi.php - About 2 hrs to fix

                              Method endCampaignRequest has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function endCampaignRequest($campaign_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 endCampaign');
                              Severity: Major
                              Found in src/Sell/Marketing/V1/Api/CampaignApi.php - About 2 hrs to fix

                                Method createCampaignRequest has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function createCampaignRequest($create_campaign_request)
                                    {
                                        // Verify the required parameter 'create_campaign_request' is set.
                                        if ($create_campaign_request === null || (\is_array($create_campaign_request) && count($create_campaign_request) === 0)) {
                                            throw new \InvalidArgumentException('Missing the required parameter $create_campaign_request when calling createCampaign');
                                Severity: Major
                                Found in src/Sell/Marketing/V1/Api/CampaignApi.php - About 2 hrs to fix

                                  Function getCampaignsRequest has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      public function getCampaignsRequest($campaign_name = null, $campaign_status = null, $end_date_range = null, $funding_strategy = null, $limit = null, $offset = null, $start_date_range = null)
                                      {
                                          $resourcePath = '/ad_campaign';
                                          $formParams = [];
                                          $queryParams = [];
                                  Severity: Minor
                                  Found in src/Sell/Marketing/V1/Api/CampaignApi.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 findCampaignByAdReferenceRequest has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      public function findCampaignByAdReferenceRequest($inventory_reference_id = null, $inventory_reference_type = null, $listing_id = null)
                                      {
                                          $resourcePath = '/ad_campaign/find_campaign_by_ad_reference';
                                          $formParams = [];
                                          $queryParams = [];
                                  Severity: Minor
                                  Found in src/Sell/Marketing/V1/Api/CampaignApi.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 findCampaignByAdReferenceWithHttpInfo has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function findCampaignByAdReferenceWithHttpInfo($inventory_reference_id = null, $inventory_reference_type = null, $listing_id = null)
                                      {
                                          $request = $this->findCampaignByAdReferenceRequest($inventory_reference_id, $inventory_reference_type, $listing_id);
                                  
                                          try {
                                  Severity: Major
                                  Found in src/Sell/Marketing/V1/Api/CampaignApi.php - About 2 hrs to fix

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

                                        public function getCampaignByNameWithHttpInfo($campaign_name)
                                        {
                                            $request = $this->getCampaignByNameRequest($campaign_name);
                                    
                                            try {
                                    Severity: Major
                                    Found in src/Sell/Marketing/V1/Api/CampaignApi.php - About 2 hrs to fix

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

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

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

                                            public function getCampaignsWithHttpInfo($campaign_name = null, $campaign_status = null, $end_date_range = null, $funding_strategy = null, $limit = null, $offset = null, $start_date_range = null)
                                            {
                                                $request = $this->getCampaignsRequest($campaign_name, $campaign_status, $end_date_range, $funding_strategy, $limit, $offset, $start_date_range);
                                        
                                                try {
                                        Severity: Major
                                        Found in src/Sell/Marketing/V1/Api/CampaignApi.php - About 2 hrs to fix

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

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

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

                                                public function createCampaignWithHttpInfo($create_campaign_request)
                                                {
                                                    $request = $this->createCampaignRequest($create_campaign_request);
                                            
                                                    try {
                                            Severity: Major
                                            Found in src/Sell/Marketing/V1/Api/CampaignApi.php - About 2 hrs to fix

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

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

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

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

                                                    public function createCampaignWithHttpInfo($create_campaign_request)
                                                    {
                                                        $request = $this->createCampaignRequest($create_campaign_request);
                                                
                                                        try {
                                                Severity: Minor
                                                Found in src/Sell/Marketing/V1/Api/CampaignApi.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 findCampaignByAdReferenceWithHttpInfo has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                                                Open

                                                    public function findCampaignByAdReferenceWithHttpInfo($inventory_reference_id = null, $inventory_reference_type = null, $listing_id = null)
                                                    {
                                                        $request = $this->findCampaignByAdReferenceRequest($inventory_reference_id, $inventory_reference_type, $listing_id);
                                                
                                                        try {
                                                Severity: Minor
                                                Found in src/Sell/Marketing/V1/Api/CampaignApi.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 suggestItemsWithHttpInfo has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                                                Open

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

                                                    public function getCampaignByNameWithHttpInfo($campaign_name)
                                                    {
                                                        $request = $this->getCampaignByNameRequest($campaign_name);
                                                
                                                        try {
                                                Severity: Minor
                                                Found in src/Sell/Marketing/V1/Api/CampaignApi.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 cloneCampaignWithHttpInfo has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                                                Open

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

                                                    public function getCampaignsWithHttpInfo($campaign_name = null, $campaign_status = null, $end_date_range = null, $funding_strategy = null, $limit = null, $offset = null, $start_date_range = null)
                                                    {
                                                        $request = $this->getCampaignsRequest($campaign_name, $campaign_status, $end_date_range, $funding_strategy, $limit, $offset, $start_date_range);
                                                
                                                        try {
                                                Severity: Minor
                                                Found in src/Sell/Marketing/V1/Api/CampaignApi.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 getCampaignsWithHttpInfo has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                                Open

                                                    public function getCampaignsWithHttpInfo($campaign_name = null, $campaign_status = null, $end_date_range = null, $funding_strategy = null, $limit = null, $offset = null, $start_date_range = null)
                                                Severity: Major
                                                Found in src/Sell/Marketing/V1/Api/CampaignApi.php - About 50 mins to fix

                                                  Method getCampaignsRequest has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                                  Open

                                                      public function getCampaignsRequest($campaign_name = null, $campaign_status = null, $end_date_range = null, $funding_strategy = null, $limit = null, $offset = null, $start_date_range = null)
                                                  Severity: Major
                                                  Found in src/Sell/Marketing/V1/Api/CampaignApi.php - About 50 mins to fix

                                                    Method getCampaigns has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                                    Open

                                                        public function getCampaigns($campaign_name = null, $campaign_status = null, $end_date_range = null, $funding_strategy = null, $limit = null, $offset = null, $start_date_range = null)
                                                    Severity: Major
                                                    Found in src/Sell/Marketing/V1/Api/CampaignApi.php - About 50 mins to fix

                                                      Method getCampaignsAsync has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                                      Open

                                                          public function getCampaignsAsync($campaign_name = null, $campaign_status = null, $end_date_range = null, $funding_strategy = null, $limit = null, $offset = null, $start_date_range = null)
                                                      Severity: Major
                                                      Found in src/Sell/Marketing/V1/Api/CampaignApi.php - About 50 mins to fix

                                                        Method getCampaignsAsyncWithHttpInfo has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                                        Open

                                                            public function getCampaignsAsyncWithHttpInfo($campaign_name = null, $campaign_status = null, $end_date_range = null, $funding_strategy = null, $limit = null, $offset = null, $start_date_range = null)
                                                        Severity: Major
                                                        Found in src/Sell/Marketing/V1/Api/CampaignApi.php - About 50 mins to fix

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

                                                              public function resumeCampaignWithHttpInfo($campaign_id)
                                                              {
                                                                  $request = $this->resumeCampaignRequest($campaign_id);
                                                          
                                                                  try {
                                                          Severity: Minor
                                                          Found in src/Sell/Marketing/V1/Api/CampaignApi.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

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

                                                              public function endCampaignWithHttpInfo($campaign_id)
                                                              {
                                                                  $request = $this->endCampaignRequest($campaign_id);
                                                          
                                                                  try {
                                                          Severity: Minor
                                                          Found in src/Sell/Marketing/V1/Api/CampaignApi.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

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

                                                              public function updateAdRateStrategyWithHttpInfo($campaign_id, $update_adrate_strategy_request)
                                                              {
                                                                  $request = $this->updateAdRateStrategyRequest($campaign_id, $update_adrate_strategy_request);
                                                          
                                                                  try {
                                                          Severity: Minor
                                                          Found in src/Sell/Marketing/V1/Api/CampaignApi.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

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

                                                              public function updateCampaignBudgetWithHttpInfo($campaign_id, $update_campaign_budget_request)
                                                              {
                                                                  $request = $this->updateCampaignBudgetRequest($campaign_id, $update_campaign_budget_request);
                                                          
                                                                  try {
                                                          Severity: Minor
                                                          Found in src/Sell/Marketing/V1/Api/CampaignApi.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

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

                                                              public function pauseCampaignWithHttpInfo($campaign_id)
                                                              {
                                                                  $request = $this->pauseCampaignRequest($campaign_id);
                                                          
                                                                  try {
                                                          Severity: Minor
                                                          Found in src/Sell/Marketing/V1/Api/CampaignApi.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

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

                                                              public function updateCampaignIdentificationWithHttpInfo($campaign_id, $update_campaign_identification_request)
                                                              {
                                                                  $request = $this->updateCampaignIdentificationRequest($campaign_id, $update_campaign_identification_request);
                                                          
                                                                  try {
                                                          Severity: Minor
                                                          Found in src/Sell/Marketing/V1/Api/CampaignApi.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

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

                                                              public function deleteCampaignWithHttpInfo($campaign_id)
                                                              {
                                                                  $request = $this->deleteCampaignRequest($campaign_id);
                                                          
                                                                  try {
                                                          Severity: Minor
                                                          Found in src/Sell/Marketing/V1/Api/CampaignApi.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 2 locations. Consider refactoring.
                                                          Open

                                                              public function suggestItemsRequest($campaign_id, $category_ids = 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 suggestItems');
                                                          Severity: Major
                                                          Found in src/Sell/Marketing/V1/Api/CampaignApi.php and 1 other location - About 3 days to fix
                                                          src/Sell/Marketing/V1/Api/AdGroupApi.php on lines 860..972

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

                                                              public function updateAdRateStrategyRequest($campaign_id, $update_adrate_strategy_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 updateAdRateStrategy');
                                                          Severity: Major
                                                          Found in src/Sell/Marketing/V1/Api/CampaignApi.php and 3 other locations - About 3 days to fix
                                                          src/Sell/Marketing/V1/Api/CampaignApi.php on lines 3197..3294
                                                          src/Sell/Marketing/V1/Api/CampaignApi.php on lines 3415..3512
                                                          src/Sell/Marketing/V1/Api/NegativeKeywordApi.php on lines 1559..1656

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

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

                                                              public function updateCampaignBudgetRequest($campaign_id, $update_campaign_budget_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 updateCampaignBudget');
                                                          Severity: Major
                                                          Found in src/Sell/Marketing/V1/Api/CampaignApi.php and 3 other locations - About 3 days to fix
                                                          src/Sell/Marketing/V1/Api/CampaignApi.php on lines 2979..3076
                                                          src/Sell/Marketing/V1/Api/CampaignApi.php on lines 3415..3512
                                                          src/Sell/Marketing/V1/Api/NegativeKeywordApi.php on lines 1559..1656

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

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

                                                              public function updateCampaignIdentificationRequest($campaign_id, $update_campaign_identification_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 updateCampaignIdentification');
                                                          Severity: Major
                                                          Found in src/Sell/Marketing/V1/Api/CampaignApi.php and 3 other locations - About 3 days to fix
                                                          src/Sell/Marketing/V1/Api/CampaignApi.php on lines 2979..3076
                                                          src/Sell/Marketing/V1/Api/CampaignApi.php on lines 3197..3294
                                                          src/Sell/Marketing/V1/Api/NegativeKeywordApi.php on lines 1559..1656

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

                                                          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 getCampaignsWithHttpInfo($campaign_name = null, $campaign_status = null, $end_date_range = null, $funding_strategy = null, $limit = null, $offset = null, $start_date_range = null)
                                                              {
                                                                  $request = $this->getCampaignsRequest($campaign_name, $campaign_status, $end_date_range, $funding_strategy, $limit, $offset, $start_date_range);
                                                          
                                                                  try {
                                                          Severity: Major
                                                          Found in src/Sell/Marketing/V1/Api/CampaignApi.php and 1 other location - About 3 days to fix
                                                          src/Sell/Fulfillment/V1/Api/PaymentDisputeApi.php on lines 1831..1896

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

                                                          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 findCampaignByAdReferenceRequest($inventory_reference_id = null, $inventory_reference_type = null, $listing_id = null)
                                                              {
                                                                  $resourcePath = '/ad_campaign/find_campaign_by_ad_reference';
                                                                  $formParams = [];
                                                                  $queryParams = [];
                                                          Severity: Major
                                                          Found in src/Sell/Marketing/V1/Api/CampaignApi.php and 1 other location - About 3 days to fix
                                                          src/Sell/Marketing/V1/Api/AdReportTaskApi.php on lines 976..1074

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

                                                          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 suggestItemsWithHttpInfo($campaign_id, $category_ids = null, $limit = null, $offset = null)
                                                              {
                                                                  $request = $this->suggestItemsRequest($campaign_id, $category_ids, $limit, $offset);
                                                          
                                                                  try {
                                                          Severity: Major
                                                          Found in src/Sell/Marketing/V1/Api/CampaignApi.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/AdGroupApi.php on lines 717..782

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

                                                              public function findCampaignByAdReferenceWithHttpInfo($inventory_reference_id = null, $inventory_reference_type = null, $listing_id = null)
                                                              {
                                                                  $request = $this->findCampaignByAdReferenceRequest($inventory_reference_id, $inventory_reference_type, $listing_id);
                                                          
                                                                  try {
                                                          Severity: Major
                                                          Found in src/Sell/Marketing/V1/Api/CampaignApi.php and 1 other location - About 2 days to fix
                                                          src/Sell/Marketing/V1/Api/AdReportTaskApi.php on lines 836..901

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

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

                                                              public function updateCampaignIdentificationWithHttpInfo($campaign_id, $update_campaign_identification_request)
                                                              {
                                                                  $request = $this->updateCampaignIdentificationRequest($campaign_id, $update_campaign_identification_request);
                                                          
                                                                  try {
                                                          Severity: Major
                                                          Found in src/Sell/Marketing/V1/Api/CampaignApi.php and 11 other locations - About 1 day to fix
                                                          src/Sell/Account/V1/Api/LocationApi.php on lines 185..215
                                                          src/Sell/Account/V1/Api/LocationApi.php on lines 1746..1776
                                                          src/Sell/Account/V1/Api/SalesTaxApi.php on lines 414..444
                                                          src/Sell/Feed/V1/Api/CustomerServiceMetricTaskApi.php on lines 179..209
                                                          src/Sell/Feed/V1/Api/ScheduleApi.php on lines 1903..1933
                                                          src/Sell/Inventory/V1/Api/LocationApi.php on lines 179..209
                                                          src/Sell/Inventory/V1/Api/LocationApi.php on lines 1584..1614
                                                          src/Sell/Marketing/V1/Api/AdApi.php on lines 2829..2859
                                                          src/Sell/Marketing/V1/Api/CampaignApi.php on lines 2887..2917
                                                          src/Sell/Marketing/V1/Api/CampaignApi.php on lines 3105..3135
                                                          src/Sell/Marketing/V1/Api/NegativeKeywordApi.php on lines 1467..1497

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

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

                                                              public function updateAdRateStrategyWithHttpInfo($campaign_id, $update_adrate_strategy_request)
                                                              {
                                                                  $request = $this->updateAdRateStrategyRequest($campaign_id, $update_adrate_strategy_request);
                                                          
                                                                  try {
                                                          Severity: Major
                                                          Found in src/Sell/Marketing/V1/Api/CampaignApi.php and 11 other locations - About 1 day to fix
                                                          src/Sell/Account/V1/Api/LocationApi.php on lines 185..215
                                                          src/Sell/Account/V1/Api/LocationApi.php on lines 1746..1776
                                                          src/Sell/Account/V1/Api/SalesTaxApi.php on lines 414..444
                                                          src/Sell/Feed/V1/Api/CustomerServiceMetricTaskApi.php on lines 179..209
                                                          src/Sell/Feed/V1/Api/ScheduleApi.php on lines 1903..1933
                                                          src/Sell/Inventory/V1/Api/LocationApi.php on lines 179..209
                                                          src/Sell/Inventory/V1/Api/LocationApi.php on lines 1584..1614
                                                          src/Sell/Marketing/V1/Api/AdApi.php on lines 2829..2859
                                                          src/Sell/Marketing/V1/Api/CampaignApi.php on lines 3105..3135
                                                          src/Sell/Marketing/V1/Api/CampaignApi.php on lines 3323..3353
                                                          src/Sell/Marketing/V1/Api/NegativeKeywordApi.php on lines 1467..1497

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

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

                                                              public function updateCampaignBudgetWithHttpInfo($campaign_id, $update_campaign_budget_request)
                                                              {
                                                                  $request = $this->updateCampaignBudgetRequest($campaign_id, $update_campaign_budget_request);
                                                          
                                                                  try {
                                                          Severity: Major
                                                          Found in src/Sell/Marketing/V1/Api/CampaignApi.php and 11 other locations - About 1 day to fix
                                                          src/Sell/Account/V1/Api/LocationApi.php on lines 185..215
                                                          src/Sell/Account/V1/Api/LocationApi.php on lines 1746..1776
                                                          src/Sell/Account/V1/Api/SalesTaxApi.php on lines 414..444
                                                          src/Sell/Feed/V1/Api/CustomerServiceMetricTaskApi.php on lines 179..209
                                                          src/Sell/Feed/V1/Api/ScheduleApi.php on lines 1903..1933
                                                          src/Sell/Inventory/V1/Api/LocationApi.php on lines 179..209
                                                          src/Sell/Inventory/V1/Api/LocationApi.php on lines 1584..1614
                                                          src/Sell/Marketing/V1/Api/AdApi.php on lines 2829..2859
                                                          src/Sell/Marketing/V1/Api/CampaignApi.php on lines 2887..2917
                                                          src/Sell/Marketing/V1/Api/CampaignApi.php on lines 3323..3353
                                                          src/Sell/Marketing/V1/Api/NegativeKeywordApi.php on lines 1467..1497

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

                                                          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 getCampaignsAsyncWithHttpInfo($campaign_name = null, $campaign_status = null, $end_date_range = null, $funding_strategy = null, $limit = null, $offset = null, $start_date_range = null)
                                                              {
                                                                  $returnType = '\TNT\Ebay\Sell\Marketing\V1\Model\CampaignPagedCollectionResponse';
                                                                  $request = $this->getCampaignsRequest($campaign_name, $campaign_status, $end_date_range, $funding_strategy, $limit, $offset, $start_date_range);
                                                          
                                                          
                                                          Severity: Major
                                                          Found in src/Sell/Marketing/V1/Api/CampaignApi.php and 1 other location - About 1 day to fix
                                                          src/Sell/Fulfillment/V1/Api/PaymentDisputeApi.php on lines 1948..1976

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

                                                          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 suggestItemsAsyncWithHttpInfo($campaign_id, $category_ids = null, $limit = null, $offset = null)
                                                              {
                                                                  $returnType = '\TNT\Ebay\Sell\Marketing\V1\Model\TargetedAdsPagedCollection';
                                                                  $request = $this->suggestItemsRequest($campaign_id, $category_ids, $limit, $offset);
                                                          
                                                          
                                                          Severity: Major
                                                          Found in src/Sell/Marketing/V1/Api/CampaignApi.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/AdGroupApi.php on lines 818..846

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

                                                              public function findCampaignByAdReferenceAsyncWithHttpInfo($inventory_reference_id = null, $inventory_reference_type = null, $listing_id = null)
                                                              {
                                                                  $returnType = '\TNT\Ebay\Sell\Marketing\V1\Model\Campaigns';
                                                                  $request = $this->findCampaignByAdReferenceRequest($inventory_reference_id, $inventory_reference_type, $listing_id);
                                                          
                                                          
                                                          Severity: Major
                                                          Found in src/Sell/Marketing/V1/Api/CampaignApi.php and 1 other location - About 1 day to fix
                                                          src/Sell/Marketing/V1/Api/AdReportTaskApi.php on lines 935..963

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

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

                                                              public function updateCampaignIdentificationAsyncWithHttpInfo($campaign_id, $update_campaign_identification_request)
                                                              {
                                                                  $returnType = '';
                                                                  $request = $this->updateCampaignIdentificationRequest($campaign_id, $update_campaign_identification_request);
                                                          
                                                          
                                                          Severity: Major
                                                          Found in src/Sell/Marketing/V1/Api/CampaignApi.php and 11 other locations - About 4 hrs to fix
                                                          src/Sell/Account/V1/Api/LocationApi.php on lines 253..271
                                                          src/Sell/Account/V1/Api/LocationApi.php on lines 1814..1832
                                                          src/Sell/Account/V1/Api/SalesTaxApi.php on lines 476..494
                                                          src/Sell/Feed/V1/Api/CustomerServiceMetricTaskApi.php on lines 241..259
                                                          src/Sell/Feed/V1/Api/ScheduleApi.php on lines 1965..1983
                                                          src/Sell/Inventory/V1/Api/LocationApi.php on lines 241..259
                                                          src/Sell/Inventory/V1/Api/LocationApi.php on lines 1646..1664
                                                          src/Sell/Marketing/V1/Api/AdApi.php on lines 2891..2909
                                                          src/Sell/Marketing/V1/Api/CampaignApi.php on lines 2949..2967
                                                          src/Sell/Marketing/V1/Api/CampaignApi.php on lines 3167..3185
                                                          src/Sell/Marketing/V1/Api/NegativeKeywordApi.php on lines 1529..1547

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

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

                                                              public function updateAdRateStrategyAsyncWithHttpInfo($campaign_id, $update_adrate_strategy_request)
                                                              {
                                                                  $returnType = '';
                                                                  $request = $this->updateAdRateStrategyRequest($campaign_id, $update_adrate_strategy_request);
                                                          
                                                          
                                                          Severity: Major
                                                          Found in src/Sell/Marketing/V1/Api/CampaignApi.php and 11 other locations - About 4 hrs to fix
                                                          src/Sell/Account/V1/Api/LocationApi.php on lines 253..271
                                                          src/Sell/Account/V1/Api/LocationApi.php on lines 1814..1832
                                                          src/Sell/Account/V1/Api/SalesTaxApi.php on lines 476..494
                                                          src/Sell/Feed/V1/Api/CustomerServiceMetricTaskApi.php on lines 241..259
                                                          src/Sell/Feed/V1/Api/ScheduleApi.php on lines 1965..1983
                                                          src/Sell/Inventory/V1/Api/LocationApi.php on lines 241..259
                                                          src/Sell/Inventory/V1/Api/LocationApi.php on lines 1646..1664
                                                          src/Sell/Marketing/V1/Api/AdApi.php on lines 2891..2909
                                                          src/Sell/Marketing/V1/Api/CampaignApi.php on lines 3167..3185
                                                          src/Sell/Marketing/V1/Api/CampaignApi.php on lines 3385..3403
                                                          src/Sell/Marketing/V1/Api/NegativeKeywordApi.php on lines 1529..1547

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

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

                                                              public function updateCampaignBudgetAsyncWithHttpInfo($campaign_id, $update_campaign_budget_request)
                                                              {
                                                                  $returnType = '';
                                                                  $request = $this->updateCampaignBudgetRequest($campaign_id, $update_campaign_budget_request);
                                                          
                                                          
                                                          Severity: Major
                                                          Found in src/Sell/Marketing/V1/Api/CampaignApi.php and 11 other locations - About 4 hrs to fix
                                                          src/Sell/Account/V1/Api/LocationApi.php on lines 253..271
                                                          src/Sell/Account/V1/Api/LocationApi.php on lines 1814..1832
                                                          src/Sell/Account/V1/Api/SalesTaxApi.php on lines 476..494
                                                          src/Sell/Feed/V1/Api/CustomerServiceMetricTaskApi.php on lines 241..259
                                                          src/Sell/Feed/V1/Api/ScheduleApi.php on lines 1965..1983
                                                          src/Sell/Inventory/V1/Api/LocationApi.php on lines 241..259
                                                          src/Sell/Inventory/V1/Api/LocationApi.php on lines 1646..1664
                                                          src/Sell/Marketing/V1/Api/AdApi.php on lines 2891..2909
                                                          src/Sell/Marketing/V1/Api/CampaignApi.php on lines 2949..2967
                                                          src/Sell/Marketing/V1/Api/CampaignApi.php on lines 3385..3403
                                                          src/Sell/Marketing/V1/Api/NegativeKeywordApi.php on lines 1529..1547

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

                                                          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 getCampaignsAsync($campaign_name = null, $campaign_status = null, $end_date_range = null, $funding_strategy = null, $limit = null, $offset = null, $start_date_range = null)
                                                              {
                                                                  return $this->getCampaignsAsyncWithHttpInfo($campaign_name, $campaign_status, $end_date_range, $funding_strategy, $limit, $offset, $start_date_range)
                                                                      ->then(
                                                                          function ($response) {
                                                          Severity: Major
                                                          Found in src/Sell/Marketing/V1/Api/CampaignApi.php and 1 other location - About 1 hr to fix
                                                          src/Sell/Fulfillment/V1/Api/PaymentDisputeApi.php on lines 1918..1926

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

                                                          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 getCampaigns($campaign_name = null, $campaign_status = null, $end_date_range = null, $funding_strategy = null, $limit = null, $offset = null, $start_date_range = null)
                                                              {
                                                                  [$response] = $this->getCampaignsWithHttpInfo($campaign_name, $campaign_status, $end_date_range, $funding_strategy, $limit, $offset, $start_date_range);
                                                          
                                                                  return $response;
                                                          Severity: Major
                                                          Found in src/Sell/Marketing/V1/Api/CampaignApi.php and 1 other location - About 1 hr to fix
                                                          src/Sell/Fulfillment/V1/Api/PaymentDisputeApi.php on lines 1803..1808

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

                                                          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