File PaymentDisputeApi.php
has 1528 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* This file is part of the trollandtoad/ebay-sdk-php package.
*
PaymentDisputeApi
has 50 functions (exceeds 20 allowed). Consider refactoring. Open
class PaymentDisputeApi
{
/**
* @var ClientInterface
*/
Method getPaymentDisputeSummariesRequest
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getPaymentDisputeSummariesRequest($order_id = null, $buyer_username = null, $open_date_from = null, $open_date_to = null, $payment_dispute_status = null, $limit = null, $offset = null)
{
$resourcePath = '/payment_dispute_summary';
$formParams = [];
$queryParams = [];
Function fetchEvidenceContentRequest
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
public function fetchEvidenceContentRequest($payment_dispute_id, $evidence_id, $file_id)
{
// Verify the required parameter 'payment_dispute_id' is set.
if ($payment_dispute_id === null || (\is_array($payment_dispute_id) && count($payment_dispute_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $payment_dispute_id when calling fetchEvidenceContent');
- 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 addEvidenceRequest
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
public function addEvidenceRequest($payment_dispute_id, $add_evidence_payment_dispute_request = null)
{
// Verify the required parameter 'payment_dispute_id' is set.
if ($payment_dispute_id === null || (\is_array($payment_dispute_id) && count($payment_dispute_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $payment_dispute_id when calling addEvidence');
- 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 updateEvidenceRequest
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
public function updateEvidenceRequest($payment_dispute_id, $update_evidence_payment_dispute_request = null)
{
// Verify the required parameter 'payment_dispute_id' is set.
if ($payment_dispute_id === null || (\is_array($payment_dispute_id) && count($payment_dispute_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $payment_dispute_id when calling updateEvidence');
- 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 acceptPaymentDisputeRequest
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
public function acceptPaymentDisputeRequest($payment_dispute_id, $accept_payment_dispute_request = null)
{
// Verify the required parameter 'payment_dispute_id' is set.
if ($payment_dispute_id === null || (\is_array($payment_dispute_id) && count($payment_dispute_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $payment_dispute_id when calling acceptPaymentDispute');
- 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 contestPaymentDisputeRequest
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
public function contestPaymentDisputeRequest($payment_dispute_id, $contest_payment_dispute_request = null)
{
// Verify the required parameter 'payment_dispute_id' is set.
if ($payment_dispute_id === null || (\is_array($payment_dispute_id) && count($payment_dispute_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $payment_dispute_id when calling contestPaymentDispute');
- 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 fetchEvidenceContentRequest
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function fetchEvidenceContentRequest($payment_dispute_id, $evidence_id, $file_id)
{
// Verify the required parameter 'payment_dispute_id' is set.
if ($payment_dispute_id === null || (\is_array($payment_dispute_id) && count($payment_dispute_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $payment_dispute_id when calling fetchEvidenceContent');
Function getPaymentDisputeRequest
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public function getPaymentDisputeRequest($payment_dispute_id)
{
// Verify the required parameter 'payment_dispute_id' is set.
if ($payment_dispute_id === null || (\is_array($payment_dispute_id) && count($payment_dispute_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $payment_dispute_id when calling getPaymentDispute');
- 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 uploadEvidenceFileRequest
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public function uploadEvidenceFileRequest($payment_dispute_id)
{
// Verify the required parameter 'payment_dispute_id' is set.
if ($payment_dispute_id === null || (\is_array($payment_dispute_id) && count($payment_dispute_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $payment_dispute_id when calling uploadEvidenceFile');
- 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 getActivitiesRequest
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public function getActivitiesRequest($payment_dispute_id)
{
// Verify the required parameter 'payment_dispute_id' is set.
if ($payment_dispute_id === null || (\is_array($payment_dispute_id) && count($payment_dispute_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $payment_dispute_id when calling getActivities');
- 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 addEvidenceRequest
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function addEvidenceRequest($payment_dispute_id, $add_evidence_payment_dispute_request = null)
{
// Verify the required parameter 'payment_dispute_id' is set.
if ($payment_dispute_id === null || (\is_array($payment_dispute_id) && count($payment_dispute_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $payment_dispute_id when calling addEvidence');
Method acceptPaymentDisputeRequest
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function acceptPaymentDisputeRequest($payment_dispute_id, $accept_payment_dispute_request = null)
{
// Verify the required parameter 'payment_dispute_id' is set.
if ($payment_dispute_id === null || (\is_array($payment_dispute_id) && count($payment_dispute_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $payment_dispute_id when calling acceptPaymentDispute');
Method contestPaymentDisputeRequest
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function contestPaymentDisputeRequest($payment_dispute_id, $contest_payment_dispute_request = null)
{
// Verify the required parameter 'payment_dispute_id' is set.
if ($payment_dispute_id === null || (\is_array($payment_dispute_id) && count($payment_dispute_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $payment_dispute_id when calling contestPaymentDispute');
Method updateEvidenceRequest
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function updateEvidenceRequest($payment_dispute_id, $update_evidence_payment_dispute_request = null)
{
// Verify the required parameter 'payment_dispute_id' is set.
if ($payment_dispute_id === null || (\is_array($payment_dispute_id) && count($payment_dispute_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $payment_dispute_id when calling updateEvidence');
Method getPaymentDisputeRequest
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getPaymentDisputeRequest($payment_dispute_id)
{
// Verify the required parameter 'payment_dispute_id' is set.
if ($payment_dispute_id === null || (\is_array($payment_dispute_id) && count($payment_dispute_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $payment_dispute_id when calling getPaymentDispute');
Method uploadEvidenceFileRequest
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function uploadEvidenceFileRequest($payment_dispute_id)
{
// Verify the required parameter 'payment_dispute_id' is set.
if ($payment_dispute_id === null || (\is_array($payment_dispute_id) && count($payment_dispute_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $payment_dispute_id when calling uploadEvidenceFile');
Method getActivitiesRequest
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getActivitiesRequest($payment_dispute_id)
{
// Verify the required parameter 'payment_dispute_id' is set.
if ($payment_dispute_id === null || (\is_array($payment_dispute_id) && count($payment_dispute_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $payment_dispute_id when calling getActivities');
Function getPaymentDisputeSummariesRequest
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function getPaymentDisputeSummariesRequest($order_id = null, $buyer_username = null, $open_date_from = null, $open_date_to = null, $payment_dispute_status = null, $limit = null, $offset = null)
{
$resourcePath = '/payment_dispute_summary';
$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 addEvidenceWithHttpInfo
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function addEvidenceWithHttpInfo($payment_dispute_id, $add_evidence_payment_dispute_request = null)
{
$request = $this->addEvidenceRequest($payment_dispute_id, $add_evidence_payment_dispute_request);
try {
Method getActivitiesWithHttpInfo
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getActivitiesWithHttpInfo($payment_dispute_id)
{
$request = $this->getActivitiesRequest($payment_dispute_id);
try {
Method fetchEvidenceContentWithHttpInfo
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function fetchEvidenceContentWithHttpInfo($payment_dispute_id, $evidence_id, $file_id)
{
$request = $this->fetchEvidenceContentRequest($payment_dispute_id, $evidence_id, $file_id);
try {
Method getPaymentDisputeSummariesWithHttpInfo
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getPaymentDisputeSummariesWithHttpInfo($order_id = null, $buyer_username = null, $open_date_from = null, $open_date_to = null, $payment_dispute_status = null, $limit = null, $offset = null)
{
$request = $this->getPaymentDisputeSummariesRequest($order_id, $buyer_username, $open_date_from, $open_date_to, $payment_dispute_status, $limit, $offset);
try {
Method getPaymentDisputeWithHttpInfo
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getPaymentDisputeWithHttpInfo($payment_dispute_id)
{
$request = $this->getPaymentDisputeRequest($payment_dispute_id);
try {
Method uploadEvidenceFileWithHttpInfo
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function uploadEvidenceFileWithHttpInfo($payment_dispute_id)
{
$request = $this->uploadEvidenceFileRequest($payment_dispute_id);
try {
Function uploadEvidenceFileWithHttpInfo
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function uploadEvidenceFileWithHttpInfo($payment_dispute_id)
{
$request = $this->uploadEvidenceFileRequest($payment_dispute_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 getActivitiesWithHttpInfo
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function getActivitiesWithHttpInfo($payment_dispute_id)
{
$request = $this->getActivitiesRequest($payment_dispute_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 addEvidenceWithHttpInfo
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function addEvidenceWithHttpInfo($payment_dispute_id, $add_evidence_payment_dispute_request = null)
{
$request = $this->addEvidenceRequest($payment_dispute_id, $add_evidence_payment_dispute_request);
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 getPaymentDisputeSummariesWithHttpInfo
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function getPaymentDisputeSummariesWithHttpInfo($order_id = null, $buyer_username = null, $open_date_from = null, $open_date_to = null, $payment_dispute_status = null, $limit = null, $offset = null)
{
$request = $this->getPaymentDisputeSummariesRequest($order_id, $buyer_username, $open_date_from, $open_date_to, $payment_dispute_status, $limit, $offset);
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 getPaymentDisputeWithHttpInfo
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function getPaymentDisputeWithHttpInfo($payment_dispute_id)
{
$request = $this->getPaymentDisputeRequest($payment_dispute_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 fetchEvidenceContentWithHttpInfo
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function fetchEvidenceContentWithHttpInfo($payment_dispute_id, $evidence_id, $file_id)
{
$request = $this->fetchEvidenceContentRequest($payment_dispute_id, $evidence_id, $file_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
Method getPaymentDisputeSummariesRequest
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
public function getPaymentDisputeSummariesRequest($order_id = null, $buyer_username = null, $open_date_from = null, $open_date_to = null, $payment_dispute_status = null, $limit = null, $offset = null)
Method getPaymentDisputeSummariesAsync
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
public function getPaymentDisputeSummariesAsync($order_id = null, $buyer_username = null, $open_date_from = null, $open_date_to = null, $payment_dispute_status = null, $limit = null, $offset = null)
Method getPaymentDisputeSummariesWithHttpInfo
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
public function getPaymentDisputeSummariesWithHttpInfo($order_id = null, $buyer_username = null, $open_date_from = null, $open_date_to = null, $payment_dispute_status = null, $limit = null, $offset = null)
Method getPaymentDisputeSummaries
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
public function getPaymentDisputeSummaries($order_id = null, $buyer_username = null, $open_date_from = null, $open_date_to = null, $payment_dispute_status = null, $limit = null, $offset = null)
Method getPaymentDisputeSummariesAsyncWithHttpInfo
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
public function getPaymentDisputeSummariesAsyncWithHttpInfo($order_id = null, $buyer_username = null, $open_date_from = null, $open_date_to = null, $payment_dispute_status = null, $limit = null, $offset = null)
Function acceptPaymentDisputeWithHttpInfo
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function acceptPaymentDisputeWithHttpInfo($payment_dispute_id, $accept_payment_dispute_request = null)
{
$request = $this->acceptPaymentDisputeRequest($payment_dispute_id, $accept_payment_dispute_request);
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 contestPaymentDisputeWithHttpInfo
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function contestPaymentDisputeWithHttpInfo($payment_dispute_id, $contest_payment_dispute_request = null)
{
$request = $this->contestPaymentDisputeRequest($payment_dispute_id, $contest_payment_dispute_request);
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 updateEvidenceWithHttpInfo
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function updateEvidenceWithHttpInfo($payment_dispute_id, $update_evidence_payment_dispute_request = null)
{
$request = $this->updateEvidenceRequest($payment_dispute_id, $update_evidence_payment_dispute_request);
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
Similar blocks of code found in 3 locations. Consider refactoring. Open
public function acceptPaymentDisputeRequest($payment_dispute_id, $accept_payment_dispute_request = null)
{
// Verify the required parameter 'payment_dispute_id' is set.
if ($payment_dispute_id === null || (\is_array($payment_dispute_id) && count($payment_dispute_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $payment_dispute_id when calling acceptPaymentDispute');
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 610.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 3 locations. Consider refactoring. Open
public function updateEvidenceRequest($payment_dispute_id, $update_evidence_payment_dispute_request = null)
{
// Verify the required parameter 'payment_dispute_id' is set.
if ($payment_dispute_id === null || (\is_array($payment_dispute_id) && count($payment_dispute_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $payment_dispute_id when calling updateEvidence');
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 610.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 3 locations. Consider refactoring. Open
public function contestPaymentDisputeRequest($payment_dispute_id, $contest_payment_dispute_request = null)
{
// Verify the required parameter 'payment_dispute_id' is set.
if ($payment_dispute_id === null || (\is_array($payment_dispute_id) && count($payment_dispute_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $payment_dispute_id when calling contestPaymentDispute');
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 610.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
public function getPaymentDisputeSummariesWithHttpInfo($order_id = null, $buyer_username = null, $open_date_from = null, $open_date_to = null, $payment_dispute_status = null, $limit = null, $offset = null)
{
$request = $this->getPaymentDisputeSummariesRequest($order_id, $buyer_username, $open_date_from, $open_date_to, $payment_dispute_status, $limit, $offset);
try {
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 597.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 4 locations. Consider refactoring. Open
public function getPaymentDisputeRequest($payment_dispute_id)
{
// Verify the required parameter 'payment_dispute_id' is set.
if ($payment_dispute_id === null || (\is_array($payment_dispute_id) && count($payment_dispute_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $payment_dispute_id when calling getPaymentDispute');
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 554.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 4 locations. Consider refactoring. Open
public function getActivitiesRequest($payment_dispute_id)
{
// Verify the required parameter 'payment_dispute_id' is set.
if ($payment_dispute_id === null || (\is_array($payment_dispute_id) && count($payment_dispute_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $payment_dispute_id when calling getActivities');
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 554.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 4 locations. Consider refactoring. Open
public function uploadEvidenceFileRequest($payment_dispute_id)
{
// Verify the required parameter 'payment_dispute_id' is set.
if ($payment_dispute_id === null || (\is_array($payment_dispute_id) && count($payment_dispute_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $payment_dispute_id when calling uploadEvidenceFile');
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 554.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 5 locations. Consider refactoring. Open
public function fetchEvidenceContentWithHttpInfo($payment_dispute_id, $evidence_id, $file_id)
{
$request = $this->fetchEvidenceContentRequest($payment_dispute_id, $evidence_id, $file_id);
try {
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 534.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
public function getPaymentDisputeSummariesAsyncWithHttpInfo($order_id = null, $buyer_username = null, $open_date_from = null, $open_date_to = null, $payment_dispute_status = null, $limit = null, $offset = null)
{
$returnType = '\TNT\Ebay\Sell\Fulfillment\V1\Model\DisputeSummaryResponse';
$request = $this->getPaymentDisputeSummariesRequest($order_id, $buyer_username, $open_date_from, $open_date_to, $payment_dispute_status, $limit, $offset);
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 301.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
public function getPaymentDisputeSummariesAsync($order_id = null, $buyer_username = null, $open_date_from = null, $open_date_to = null, $payment_dispute_status = null, $limit = null, $offset = null)
{
return $this->getPaymentDisputeSummariesAsyncWithHttpInfo($order_id, $buyer_username, $open_date_from, $open_date_to, $payment_dispute_status, $limit, $offset)
->then(
function ($response) {
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 115.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
public function getPaymentDisputeSummaries($order_id = null, $buyer_username = null, $open_date_from = null, $open_date_to = null, $payment_dispute_status = null, $limit = null, $offset = null)
{
[$response] = $this->getPaymentDisputeSummariesWithHttpInfo($order_id, $buyer_username, $open_date_from, $open_date_to, $payment_dispute_status, $limit, $offset);
return $response;
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 105.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76