File ProgramApi.php
has 542 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* This file is part of the trollandtoad/ebay-sdk-php package.
*
Function optOutOfProgramRequest
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
public function optOutOfProgramRequest($program)
{
// Verify the required parameter 'program' is set.
if ($program === null || (\is_array($program) && count($program) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $program when calling optOutOfProgram');
- 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 optInToProgramRequest
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
public function optInToProgramRequest($program)
{
// Verify the required parameter 'program' is set.
if ($program === null || (\is_array($program) && count($program) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $program when calling optInToProgram');
- 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 optOutOfProgramRequest
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function optOutOfProgramRequest($program)
{
// Verify the required parameter 'program' is set.
if ($program === null || (\is_array($program) && count($program) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $program when calling optOutOfProgram');
Method optInToProgramRequest
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function optInToProgramRequest($program)
{
// Verify the required parameter 'program' is set.
if ($program === null || (\is_array($program) && count($program) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $program when calling optInToProgram');
Method getOptedInProgramsRequest
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getOptedInProgramsRequest()
{
$resourcePath = '/program/get_opted_in_programs';
$formParams = [];
$queryParams = [];
Function getOptedInProgramsRequest
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public function getOptedInProgramsRequest()
{
$resourcePath = '/program/get_opted_in_programs';
$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 optOutOfProgramWithHttpInfo
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function optOutOfProgramWithHttpInfo($program)
{
$request = $this->optOutOfProgramRequest($program);
try {
Method getOptedInProgramsWithHttpInfo
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getOptedInProgramsWithHttpInfo()
{
$request = $this->getOptedInProgramsRequest();
try {
Method optInToProgramWithHttpInfo
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function optInToProgramWithHttpInfo($program)
{
$request = $this->optInToProgramRequest($program);
try {
Function getOptedInProgramsWithHttpInfo
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function getOptedInProgramsWithHttpInfo()
{
$request = $this->getOptedInProgramsRequest();
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 optInToProgramWithHttpInfo
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function optInToProgramWithHttpInfo($program)
{
$request = $this->optInToProgramRequest($program);
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 optOutOfProgramWithHttpInfo
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function optOutOfProgramWithHttpInfo($program)
{
$request = $this->optOutOfProgramRequest($program);
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"