Showing 3,709 of 3,709 total issues
File ListingViolationApi.php
has 371 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* This file is part of the trollandtoad/ebay-sdk-php package.
*
Similar blocks of code found in 2 locations. Consider refactoring. Open
public function updateConfigAsyncWithHttpInfo($config = null)
{
$returnType = '';
$request = $this->updateConfigRequest($config);
- 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 180.
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 createVideoAsyncWithHttpInfo($body = null)
{
$returnType = '';
$request = $this->createVideoRequest($body);
- 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 180.
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
Method searchByImageRequest
has 119 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function searchByImageRequest($aspect_filter = null, $category_ids = null, $charity_ids = null, $fieldgroups = null, $filter = null, $limit = null, $offset = null, $sort = null, $search_by_image_request = null)
{
$resourcePath = '/item_summary/search_by_image';
$formParams = [];
$queryParams = [];
Function updateKeywordRequest
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
public function updateKeywordRequest($campaign_id, $keyword_id, $update_keyword_request)
{
// Verify the required parameter 'campaign_id' is set.
if ($campaign_id === null || (\is_array($campaign_id) && count($campaign_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $campaign_id when calling updateKeyword');
- 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 suggestBidsRequest
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
public function suggestBidsRequest($ad_group_id, $campaign_id, $targeted_bid_request)
{
// Verify the required parameter 'ad_group_id' is set.
if ($ad_group_id === null || (\is_array($ad_group_id) && count($ad_group_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $ad_group_id when calling suggestBids');
- 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 updateBidRequest
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
public function updateBidRequest($ad_id, $campaign_id, $update_bid_percentage_request)
{
// Verify the required parameter 'ad_id' is set.
if ($ad_id === null || (\is_array($ad_id) && count($ad_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $ad_id when calling updateBid');
- 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 updateAdGroupRequest
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
public function updateAdGroupRequest($ad_group_id, $campaign_id, $update_ad_group_request)
{
// Verify the required parameter 'ad_group_id' is set.
if ($ad_group_id === null || (\is_array($ad_group_id) && count($ad_group_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $ad_group_id when calling updateAdGroup');
- 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 createOrReplaceSalesTaxRequest
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
public function createOrReplaceSalesTaxRequest($country_code, $jurisdiction_id, $sales_tax_base)
{
// Verify the required parameter 'country_code' is set.
if ($country_code === null || (\is_array($country_code) && count($country_code) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $country_code when calling createOrReplaceSalesTax');
- 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 updateCustomPolicyRequest
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
public function updateCustomPolicyRequest($custom_policy_id, $x_ebay_c_marketplace_id, $custom_policy_request)
{
// Verify the required parameter 'custom_policy_id' is set.
if ($custom_policy_id === null || (\is_array($custom_policy_id) && count($custom_policy_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $custom_policy_id when calling updateCustomPolicy');
- 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
SearchPagedCollection
has 36 functions (exceeds 20 allowed). Consider refactoring. Open
class SearchPagedCollection implements ModelInterface, \ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
Event
has 36 functions (exceeds 20 allowed). Consider refactoring. Open
class Event implements ModelInterface, \ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
PricingSummaryV2
has 36 functions (exceeds 20 allowed). Consider refactoring. Open
class PricingSummaryV2 implements ModelInterface, \ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
Campaign
has 36 functions (exceeds 20 allowed). Consider refactoring. Open
class Campaign implements ModelInterface, \ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
PaymentPolicy
has 36 functions (exceeds 20 allowed). Consider refactoring. Open
class PaymentPolicy implements ModelInterface, \ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
InventoryLocationFull
has 36 functions (exceeds 20 allowed). Consider refactoring. Open
class InventoryLocationFull implements ModelInterface, \ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
InventoryLocationFull
has 36 functions (exceeds 20 allowed). Consider refactoring. Open
class InventoryLocationFull implements ModelInterface, \ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
AspectConstraint
has 36 functions (exceeds 20 allowed). Consider refactoring. Open
class AspectConstraint implements ModelInterface, \ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
Function getItemGroupFeedRequest
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
public function getItemGroupFeedRequest($accept, $x_ebay_c_marketplace_id, $feed_scope, $category_id, $range = null, $date = null)
{
// Verify the required parameter 'accept' is set.
if ($accept === null || (\is_array($accept) && count($accept) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $accept when calling getItemGroupFeed');
- 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 createOrReplaceProductCompatibilityRequest
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
public function createOrReplaceProductCompatibilityRequest($content_language, $sku, $compatibility)
{
// Verify the required parameter 'content_language' is set.
if ($content_language === null || (\is_array($content_language) && count($content_language) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $content_language when calling createOrReplaceProductCompatibility');
- 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"