File RateTableApi.php
has 347 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* This file is part of the trollandtoad/ebay-sdk-php package.
*
Function updateShippingCostRequest
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
public function updateShippingCostRequest($rate_table_id, $rate_table_update = null)
{
// Verify the required parameter 'rate_table_id' is set.
if ($rate_table_id === null || (\is_array($rate_table_id) && count($rate_table_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $rate_table_id when calling updateShippingCost');
- 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 updateShippingCostRequest
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function updateShippingCostRequest($rate_table_id, $rate_table_update = null)
{
// Verify the required parameter 'rate_table_id' is set.
if ($rate_table_id === null || (\is_array($rate_table_id) && count($rate_table_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $rate_table_id when calling updateShippingCost');
Function getRateTableRequest
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
public function getRateTableRequest($rate_table_id)
{
// Verify the required parameter 'rate_table_id' is set.
if ($rate_table_id === null || (\is_array($rate_table_id) && count($rate_table_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $rate_table_id when calling getRateTable');
- 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 getRateTableRequest
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getRateTableRequest($rate_table_id)
{
// Verify the required parameter 'rate_table_id' is set.
if ($rate_table_id === null || (\is_array($rate_table_id) && count($rate_table_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $rate_table_id when calling getRateTable');
Method getRateTableWithHttpInfo
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getRateTableWithHttpInfo($rate_table_id)
{
$request = $this->getRateTableRequest($rate_table_id);
try {
Function getRateTableWithHttpInfo
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function getRateTableWithHttpInfo($rate_table_id)
{
$request = $this->getRateTableRequest($rate_table_id);
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 updateShippingCostWithHttpInfo
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function updateShippingCostWithHttpInfo($rate_table_id, $rate_table_update = null)
{
$request = $this->updateShippingCostRequest($rate_table_id, $rate_table_update);
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"