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.
*
CampaignApi
has 75 functions (exceeds 20 allowed). Consider refactoring. Open
class CampaignApi
{
/**
* @var ClientInterface
*/
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 = [];
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');
- Read upRead up
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');
- Read upRead up
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 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');
- Read upRead up
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');
- Read upRead up
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');
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');
- Read upRead up
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 = [];
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');
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');
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');
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');
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');
- Read upRead up
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');
- Read upRead up
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');
- Read upRead up
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');
- Read upRead up
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 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');
- Read upRead up
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');
- Read upRead up
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');
- Read upRead up
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');
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');
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');
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');
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');
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');
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');
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 = [];
- Read upRead up
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 = [];
- Read upRead up
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 getCampaignByNameWithHttpInfo
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getCampaignByNameWithHttpInfo($campaign_name)
{
$request = $this->getCampaignByNameRequest($campaign_name);
try {
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 {
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 {
Method getCampaignWithHttpInfo
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getCampaignWithHttpInfo($campaign_id)
{
$request = $this->getCampaignRequest($campaign_id);
try {
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 {
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 {
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 {
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 {
- Read upRead up
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 getCampaignWithHttpInfo
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function getCampaignWithHttpInfo($campaign_id)
{
$request = $this->getCampaignRequest($campaign_id);
try {
- Read upRead up
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 {
- Read upRead up
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 {
- Read upRead up
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 {
- Read upRead up
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 {
- Read upRead up
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 {
- Read upRead up
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 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)
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)
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)
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)
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)
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 {
- Read upRead up
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 {
- Read upRead up
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 {
- Read upRead up
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 {
- Read upRead up
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 resumeCampaignWithHttpInfo
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function resumeCampaignWithHttpInfo($campaign_id)
{
$request = $this->resumeCampaignRequest($campaign_id);
try {
- Read upRead up
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 {
- Read upRead up
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 {
- Read upRead up
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');
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
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');
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
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');
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
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');
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
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 {
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
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 = [];
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
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 {
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
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 {
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
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 {
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
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 {
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
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 {
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
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);
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
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);
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
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);
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
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);
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
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);
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
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);
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
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) {
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
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;
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76