Showing 3,709 of 3,709 total issues
Method createOrReplaceProductCompatibilityWithHttpInfo
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function createOrReplaceProductCompatibilityWithHttpInfo($content_language, $sku, $compatibility)
{
$request = $this->createOrReplaceProductCompatibilityRequest($content_language, $sku, $compatibility);
try {
Method createOrReplaceInventoryItemWithHttpInfo
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function createOrReplaceInventoryItemWithHttpInfo($content_language, $sku, $inventory_item)
{
$request = $this->createOrReplaceInventoryItemRequest($content_language, $sku, $inventory_item);
try {
Similar blocks of code found in 2 locations. Consider refactoring. Open
public function searchByImageAsync($aspect_filter = null, $category_ids = null, $charity_ids = null, $fieldgroups = null, $filter = null, $limit = null, $offset = null, $sort = null, $search_by_image_request = null)
{
return $this->searchByImageAsyncWithHttpInfo($aspect_filter, $category_ids, $charity_ids, $fieldgroups, $filter, $limit, $offset, $sort, $search_by_image_request)
->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 139.
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 searchAsync($x_ebay_c_marketplace_id = null, $aspect_filter = null, $category_ids = null, $fieldgroups = null, $gtin = null, $limit = null, $mpn = null, $offset = null, $q = null)
{
return $this->searchAsyncWithHttpInfo($x_ebay_c_marketplace_id, $aspect_filter, $category_ids, $fieldgroups, $gtin, $limit, $mpn, $offset, $q)
->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 139.
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 getItemsRequest
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getItemsRequest($item_ids = null, $item_group_ids = null)
{
$resourcePath = '/item/';
$formParams = [];
$queryParams = [];
Method getUserRateLimitsRequest
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getUserRateLimitsRequest($api_context = null, $api_name = null)
{
$resourcePath = '/user_rate_limit/';
$formParams = [];
$queryParams = [];
Method getRateLimitsRequest
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getRateLimitsRequest($api_context = null, $api_name = null)
{
$resourcePath = '/rate_limit/';
$formParams = [];
$queryParams = [];
Method getSubscriptionRequest
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getSubscriptionRequest($limit = null, $continuation_token = null)
{
$resourcePath = '/subscription';
$formParams = [];
$queryParams = [];
Method getOrderRequest
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getOrderRequest($order_id, $field_groups = null)
{
// Verify the required parameter 'order_id' is set.
if ($order_id === null || (\is_array($order_id) && count($order_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $order_id when calling getOrder');
Method getSubscriptionsRequest
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getSubscriptionsRequest($limit = null, $continuation_token = null)
{
$resourcePath = '/subscription';
$formParams = [];
$queryParams = [];
Method getDestinationsRequest
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getDestinationsRequest($limit = null, $continuation_token = null)
{
$resourcePath = '/destination';
$formParams = [];
$queryParams = [];
Method getTopicsRequest
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getTopicsRequest($limit = null, $continuation_token = null)
{
$resourcePath = '/topic';
$formParams = [];
$queryParams = [];
ShoppingCartApi
has 25 functions (exceeds 20 allowed). Consider refactoring. Open
class ShoppingCartApi
{
/**
* @var ClientInterface
*/
ShipmentApi
has 25 functions (exceeds 20 allowed). Consider refactoring. Open
class ShipmentApi
{
/**
* @var ClientInterface
*/
ItemPromotionApi
has 25 functions (exceeds 20 allowed). Consider refactoring. Open
class ItemPromotionApi
{
/**
* @var ClientInterface
*/
PromotionApi
has 25 functions (exceeds 20 allowed). Consider refactoring. Open
class PromotionApi
{
/**
* @var ClientInterface
*/
ItemPriceMarkdownApi
has 25 functions (exceeds 20 allowed). Consider refactoring. Open
class ItemPriceMarkdownApi
{
/**
* @var ClientInterface
*/
AdReportTaskApi
has 25 functions (exceeds 20 allowed). Consider refactoring. Open
class AdReportTaskApi
{
/**
* @var ClientInterface
*/
SalesTaxApi
has 25 functions (exceeds 20 allowed). Consider refactoring. Open
class SalesTaxApi
{
/**
* @var ClientInterface
*/
CustomPolicyApi
has 25 functions (exceeds 20 allowed). Consider refactoring. Open
class CustomPolicyApi
{
/**
* @var ClientInterface
*/