Showing 3,709 of 3,709 total issues
Method suppressViolationRequest
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function suppressViolationRequest($suppress_violation_request)
{
// Verify the required parameter 'suppress_violation_request' is set.
if ($suppress_violation_request === null || (\is_array($suppress_violation_request) && count($suppress_violation_request) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $suppress_violation_request when calling suppressViolation');
Method translateRequest
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function translateRequest($translate_request)
{
// Verify the required parameter 'translate_request' is set.
if ($translate_request === null || (\is_array($translate_request) && count($translate_request) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $translate_request when calling translate');
Method createSubscriptionRequest
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function createSubscriptionRequest($create_subscription_request = null)
{
$resourcePath = '/subscription';
$formParams = [];
$queryParams = [];
Method updateConfigRequest
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function updateConfigRequest($config = null)
{
$resourcePath = '/config';
$formParams = [];
$queryParams = [];
Method createDestinationRequest
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function createDestinationRequest($destination_request = null)
{
$resourcePath = '/destination';
$formParams = [];
$queryParams = [];
File ItemGroupApi.php
has 270 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* This file is part of the trollandtoad/ebay-sdk-php package.
*
File ProductSummaryApi.php
has 268 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* This file is part of the trollandtoad/ebay-sdk-php package.
*
Function getPaymentDisputeSummariesRequest
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function getPaymentDisputeSummariesRequest($order_id = null, $buyer_username = null, $open_date_from = null, $open_date_to = null, $payment_dispute_status = null, $limit = null, $offset = null)
{
$resourcePath = '/payment_dispute_summary';
$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 createSigningKeyRequest
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function createSigningKeyRequest($create_signing_key_request = null)
{
$resourcePath = '/signing_key';
$formParams = [];
$queryParams = [];
Method registerClientRequest
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function registerClientRequest($client_settings)
{
// Verify the required parameter 'client_settings' is set.
if ($client_settings === null || (\is_array($client_settings) && count($client_settings) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $client_settings when calling registerClient');
Method getListingFeesRequest
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getListingFeesRequest($offer_keys_with_id = null)
{
$resourcePath = '/offer/get_listing_fees';
$formParams = [];
$queryParams = [];
Method createVideoRequest
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function createVideoRequest($body = null)
{
$resourcePath = '/video';
$formParams = [];
$queryParams = [];
Similar blocks of code found in 2 locations. Consider refactoring. Open
public function search($x_ebay_c_marketplace_id = null, $aspect_filter = null, $category_ids = null, $fieldgroups = null, $gtin = null, $limit = null, $mpn = null, $offset = null, $q = null)
{
[$response] = $this->searchWithHttpInfo($x_ebay_c_marketplace_id, $aspect_filter, $category_ids, $fieldgroups, $gtin, $limit, $mpn, $offset, $q);
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 129.
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 searchByImage($aspect_filter = null, $category_ids = null, $charity_ids = null, $fieldgroups = null, $filter = null, $limit = null, $offset = null, $sort = null, $search_by_image_request = null)
{
[$response] = $this->searchByImageWithHttpInfo($aspect_filter, $category_ids, $charity_ids, $fieldgroups, $filter, $limit, $offset, $sort, $search_by_image_request);
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 129.
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
File ItemPriorityApi.php
has 266 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* This file is part of the trollandtoad/ebay-sdk-php package.
*
File ItemSnapshotApi.php
has 266 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* This file is part of the trollandtoad/ebay-sdk-php package.
*
SellerCustomPolicy
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
class SellerCustomPolicy implements ModelInterface, \ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
ReviewRating
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
class ReviewRating implements ModelInterface, \ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
BuyingOptionDistribution
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
class BuyingOptionDistribution implements ModelInterface, \ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
CompatibilityProperty
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
class CompatibilityProperty implements ModelInterface, \ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**