File ShoppingCartApi.php
has 698 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* This file is part of the trollandtoad/ebay-sdk-php package.
*
Function removeItemRequest
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function removeItemRequest($remove_cart_item_input = null)
{
$resourcePath = '/shopping_cart/remove_item';
$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 addItemRequest
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function addItemRequest($add_cart_item_input = null)
{
$resourcePath = '/shopping_cart/add_item';
$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 updateQuantityRequest
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function updateQuantityRequest($update_cart_item_input = null)
{
$resourcePath = '/shopping_cart/update_quantity';
$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
ShoppingCartApi
has 25 functions (exceeds 20 allowed). Consider refactoring. Open
class ShoppingCartApi
{
/**
* @var ClientInterface
*/
Method removeItemRequest
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function removeItemRequest($remove_cart_item_input = null)
{
$resourcePath = '/shopping_cart/remove_item';
$formParams = [];
$queryParams = [];
Method addItemRequest
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function addItemRequest($add_cart_item_input = null)
{
$resourcePath = '/shopping_cart/add_item';
$formParams = [];
$queryParams = [];
Method updateQuantityRequest
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function updateQuantityRequest($update_cart_item_input = null)
{
$resourcePath = '/shopping_cart/update_quantity';
$formParams = [];
$queryParams = [];
Method getShoppingCartRequest
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getShoppingCartRequest()
{
$resourcePath = '/shopping_cart/';
$formParams = [];
$queryParams = [];
Function getShoppingCartRequest
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public function getShoppingCartRequest()
{
$resourcePath = '/shopping_cart/';
$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 updateQuantityWithHttpInfo
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function updateQuantityWithHttpInfo($update_cart_item_input = null)
{
$request = $this->updateQuantityRequest($update_cart_item_input);
try {
Method addItemWithHttpInfo
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function addItemWithHttpInfo($add_cart_item_input = null)
{
$request = $this->addItemRequest($add_cart_item_input);
try {
Method getShoppingCartWithHttpInfo
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getShoppingCartWithHttpInfo()
{
$request = $this->getShoppingCartRequest();
try {
Method removeItemWithHttpInfo
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function removeItemWithHttpInfo($remove_cart_item_input = null)
{
$request = $this->removeItemRequest($remove_cart_item_input);
try {
Function removeItemWithHttpInfo
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function removeItemWithHttpInfo($remove_cart_item_input = null)
{
$request = $this->removeItemRequest($remove_cart_item_input);
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 updateQuantityWithHttpInfo
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function updateQuantityWithHttpInfo($update_cart_item_input = null)
{
$request = $this->updateQuantityRequest($update_cart_item_input);
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 getShoppingCartWithHttpInfo
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function getShoppingCartWithHttpInfo()
{
$request = $this->getShoppingCartRequest();
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 addItemWithHttpInfo
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function addItemWithHttpInfo($add_cart_item_input = null)
{
$request = $this->addItemRequest($add_cart_item_input);
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"