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.
*
Function getTopicRequest
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public function getTopicRequest($topic_id)
{
// Verify the required parameter 'topic_id' is set.
if ($topic_id === null || (\is_array($topic_id) && count($topic_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $topic_id when calling getTopic');
- 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 getTopicsRequest
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getTopicsRequest($limit = null, $continuation_token = null)
{
$resourcePath = '/topic';
$formParams = [];
$queryParams = [];
Method getTopicRequest
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getTopicRequest($topic_id)
{
// Verify the required parameter 'topic_id' is set.
if ($topic_id === null || (\is_array($topic_id) && count($topic_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $topic_id when calling getTopic');
Function getTopicsRequest
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public function getTopicsRequest($limit = null, $continuation_token = null)
{
$resourcePath = '/topic';
$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 getTopicsWithHttpInfo
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getTopicsWithHttpInfo($limit = null, $continuation_token = null)
{
$request = $this->getTopicsRequest($limit, $continuation_token);
try {
Method getTopicWithHttpInfo
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getTopicWithHttpInfo($topic_id)
{
$request = $this->getTopicRequest($topic_id);
try {
Function getTopicWithHttpInfo
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function getTopicWithHttpInfo($topic_id)
{
$request = $this->getTopicRequest($topic_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 getTopicsWithHttpInfo
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function getTopicsWithHttpInfo($limit = null, $continuation_token = null)
{
$request = $this->getTopicsRequest($limit, $continuation_token);
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"