Showing 2,539 of 3,709 total issues
Function sanitizeForSerialization
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
public static function sanitizeForSerialization($data, $type = null, $format = null)
{
if (\is_scalar($data) || $data === null) {
return $data;
}
- 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 sanitizeForSerialization
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
public static function sanitizeForSerialization($data, $type = null, $format = null)
{
if (\is_scalar($data) || $data === null) {
return $data;
}
- 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 sanitizeForSerialization
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
public static function sanitizeForSerialization($data, $type = null, $format = null)
{
if (\is_scalar($data) || $data === null) {
return $data;
}
- 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
File TopicApi.php
has 392 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* This file is part of the trollandtoad/ebay-sdk-php package.
*
GuestCheckoutSessionApi
has 40 functions (exceeds 20 allowed). Consider refactoring. Open
class GuestCheckoutSessionApi
{
/**
* @var ClientInterface
*/
ClientDetails
has 40 functions (exceeds 20 allowed). Consider refactoring. Open
class ClientDetails implements ModelInterface, \ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
Payout
has 40 functions (exceeds 20 allowed). Consider refactoring. Open
class Payout implements ModelInterface, \ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
ItemPriceMarkdown
has 40 functions (exceeds 20 allowed). Consider refactoring. Open
class ItemPriceMarkdown implements ModelInterface, \ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
PromotionDetail
has 40 functions (exceeds 20 allowed). Consider refactoring. Open
class PromotionDetail implements ModelInterface, \ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
ListingDetail
has 40 functions (exceeds 20 allowed). Consider refactoring. Open
class ListingDetail implements ModelInterface, \ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
CreateReportTask
has 40 functions (exceeds 20 allowed). Consider refactoring. Open
class CreateReportTask implements ModelInterface, \ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
LocationApi
has 40 functions (exceeds 20 allowed). Consider refactoring. Open
class LocationApi
{
/**
* @var ClientInterface
*/
FulfillmentPolicy
has 40 functions (exceeds 20 allowed). Consider refactoring. Open
class FulfillmentPolicy implements ModelInterface, \ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
LocationApi
has 40 functions (exceeds 20 allowed). Consider refactoring. Open
class LocationApi
{
/**
* @var ClientInterface
*/
InventoryItemApi
has 40 functions (exceeds 20 allowed). Consider refactoring. Open
class InventoryItemApi
{
/**
* @var ClientInterface
*/
Product
has 40 functions (exceeds 20 allowed). Consider refactoring. Open
class Product implements ModelInterface, \ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
Offer
has 40 functions (exceeds 20 allowed). Consider refactoring. Open
class Offer implements ModelInterface, \ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
File ShippingQuoteApi.php
has 387 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* This file is part of the trollandtoad/ebay-sdk-php package.
*
File SellerStandardsProfileApi.php
has 382 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* This file is part of the trollandtoad/ebay-sdk-php package.
*
Function getItemPriorityFeedRequest
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
public function getItemPriorityFeedRequest($accept, $x_ebay_c_marketplace_id, $range, $category_id, $date)
{
// 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 getItemPriorityFeed');
- 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"