File OfferApi.php
has 1967 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* This file is part of the trollandtoad/ebay-sdk-php package.
*
OfferApi
has 65 functions (exceeds 20 allowed). Consider refactoring. Open
class OfferApi
{
/**
* @var ClientInterface
*/
Function updateOfferRequest
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
public function updateOfferRequest($content_language, $offer_id, $ebay_offer_details_with_id)
{
// Verify the required parameter 'content_language' is set.
if ($content_language === null || (\is_array($content_language) && count($content_language) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $content_language when calling updateOffer');
- 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 createOfferRequest
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
public function createOfferRequest($content_language, $ebay_offer_details_with_keys)
{
// Verify the required parameter 'content_language' is set.
if ($content_language === null || (\is_array($content_language) && count($content_language) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $content_language when calling createOffer');
- 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 getOffersRequest
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getOffersRequest($format = null, $limit = null, $marketplace_id = null, $offset = null, $sku = null)
{
$resourcePath = '/offer';
$formParams = [];
$queryParams = [];
Function withdrawOfferByInventoryItemGroupRequest
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public function withdrawOfferByInventoryItemGroupRequest($withdraw_by_inventory_item_group_request)
{
// Verify the required parameter 'withdraw_by_inventory_item_group_request' is set.
if ($withdraw_by_inventory_item_group_request === null || (\is_array($withdraw_by_inventory_item_group_request) && count($withdraw_by_inventory_item_group_request) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $withdraw_by_inventory_item_group_request when calling withdrawOfferByInventoryItemGroup');
- 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 bulkPublishOfferRequest
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public function bulkPublishOfferRequest($bulk_offer)
{
// Verify the required parameter 'bulk_offer' is set.
if ($bulk_offer === null || (\is_array($bulk_offer) && count($bulk_offer) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $bulk_offer when calling bulkPublishOffer');
- 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 bulkCreateOfferRequest
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public function bulkCreateOfferRequest($bulk_ebay_offer_details_with_keys)
{
// Verify the required parameter 'bulk_ebay_offer_details_with_keys' is set.
if ($bulk_ebay_offer_details_with_keys === null || (\is_array($bulk_ebay_offer_details_with_keys) && count($bulk_ebay_offer_details_with_keys) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $bulk_ebay_offer_details_with_keys when calling bulkCreateOffer');
- 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 publishOfferByInventoryItemGroupRequest
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public function publishOfferByInventoryItemGroupRequest($publish_by_inventory_item_group_request)
{
// Verify the required parameter 'publish_by_inventory_item_group_request' is set.
if ($publish_by_inventory_item_group_request === null || (\is_array($publish_by_inventory_item_group_request) && count($publish_by_inventory_item_group_request) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $publish_by_inventory_item_group_request when calling publishOfferByInventoryItemGroup');
- 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 updateOfferRequest
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function updateOfferRequest($content_language, $offer_id, $ebay_offer_details_with_id)
{
// Verify the required parameter 'content_language' is set.
if ($content_language === null || (\is_array($content_language) && count($content_language) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $content_language when calling updateOffer');
Method createOfferRequest
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function createOfferRequest($content_language, $ebay_offer_details_with_keys)
{
// Verify the required parameter 'content_language' is set.
if ($content_language === null || (\is_array($content_language) && count($content_language) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $content_language when calling createOffer');
Function publishOfferRequest
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
public function publishOfferRequest($offer_id)
{
// Verify the required parameter 'offer_id' is set.
if ($offer_id === null || (\is_array($offer_id) && count($offer_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $offer_id when calling publishOffer');
- 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 getListingFeesRequest
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
public function getListingFeesRequest($offer_keys_with_id = null)
{
$resourcePath = '/offer/get_listing_fees';
$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 getOfferRequest
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
public function getOfferRequest($offer_id)
{
// Verify the required parameter 'offer_id' is set.
if ($offer_id === null || (\is_array($offer_id) && count($offer_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $offer_id when calling getOffer');
- 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 deleteOfferRequest
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
public function deleteOfferRequest($offer_id)
{
// Verify the required parameter 'offer_id' is set.
if ($offer_id === null || (\is_array($offer_id) && count($offer_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $offer_id when calling deleteOffer');
- 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 withdrawOfferRequest
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
public function withdrawOfferRequest($offer_id)
{
// Verify the required parameter 'offer_id' is set.
if ($offer_id === null || (\is_array($offer_id) && count($offer_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $offer_id when calling withdrawOffer');
- 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 withdrawOfferRequest
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function withdrawOfferRequest($offer_id)
{
// Verify the required parameter 'offer_id' is set.
if ($offer_id === null || (\is_array($offer_id) && count($offer_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $offer_id when calling withdrawOffer');
Method getOfferRequest
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getOfferRequest($offer_id)
{
// Verify the required parameter 'offer_id' is set.
if ($offer_id === null || (\is_array($offer_id) && count($offer_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $offer_id when calling getOffer');
Method publishOfferRequest
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function publishOfferRequest($offer_id)
{
// Verify the required parameter 'offer_id' is set.
if ($offer_id === null || (\is_array($offer_id) && count($offer_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $offer_id when calling publishOffer');
Method deleteOfferRequest
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function deleteOfferRequest($offer_id)
{
// Verify the required parameter 'offer_id' is set.
if ($offer_id === null || (\is_array($offer_id) && count($offer_id) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $offer_id when calling deleteOffer');
Method publishOfferByInventoryItemGroupRequest
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function publishOfferByInventoryItemGroupRequest($publish_by_inventory_item_group_request)
{
// Verify the required parameter 'publish_by_inventory_item_group_request' is set.
if ($publish_by_inventory_item_group_request === null || (\is_array($publish_by_inventory_item_group_request) && count($publish_by_inventory_item_group_request) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $publish_by_inventory_item_group_request when calling publishOfferByInventoryItemGroup');
Method withdrawOfferByInventoryItemGroupRequest
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function withdrawOfferByInventoryItemGroupRequest($withdraw_by_inventory_item_group_request)
{
// Verify the required parameter 'withdraw_by_inventory_item_group_request' is set.
if ($withdraw_by_inventory_item_group_request === null || (\is_array($withdraw_by_inventory_item_group_request) && count($withdraw_by_inventory_item_group_request) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $withdraw_by_inventory_item_group_request when calling withdrawOfferByInventoryItemGroup');
Method bulkCreateOfferRequest
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function bulkCreateOfferRequest($bulk_ebay_offer_details_with_keys)
{
// Verify the required parameter 'bulk_ebay_offer_details_with_keys' is set.
if ($bulk_ebay_offer_details_with_keys === null || (\is_array($bulk_ebay_offer_details_with_keys) && count($bulk_ebay_offer_details_with_keys) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $bulk_ebay_offer_details_with_keys when calling bulkCreateOffer');
Method bulkPublishOfferRequest
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function bulkPublishOfferRequest($bulk_offer)
{
// Verify the required parameter 'bulk_offer' is set.
if ($bulk_offer === null || (\is_array($bulk_offer) && count($bulk_offer) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $bulk_offer when calling bulkPublishOffer');
Method getListingFeesRequest
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getListingFeesRequest($offer_keys_with_id = null)
{
$resourcePath = '/offer/get_listing_fees';
$formParams = [];
$queryParams = [];
Method updateOfferWithHttpInfo
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function updateOfferWithHttpInfo($content_language, $offer_id, $ebay_offer_details_with_id)
{
$request = $this->updateOfferRequest($content_language, $offer_id, $ebay_offer_details_with_id);
try {
Method createOfferWithHttpInfo
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function createOfferWithHttpInfo($content_language, $ebay_offer_details_with_keys)
{
$request = $this->createOfferRequest($content_language, $ebay_offer_details_with_keys);
try {
Method getListingFeesWithHttpInfo
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getListingFeesWithHttpInfo($offer_keys_with_id = null)
{
$request = $this->getListingFeesRequest($offer_keys_with_id);
try {
Method getOffersWithHttpInfo
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getOffersWithHttpInfo($format = null, $limit = null, $marketplace_id = null, $offset = null, $sku = null)
{
$request = $this->getOffersRequest($format, $limit, $marketplace_id, $offset, $sku);
try {
Method withdrawOfferWithHttpInfo
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function withdrawOfferWithHttpInfo($offer_id)
{
$request = $this->withdrawOfferRequest($offer_id);
try {
Method publishOfferWithHttpInfo
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function publishOfferWithHttpInfo($offer_id)
{
$request = $this->publishOfferRequest($offer_id);
try {
Method bulkCreateOfferWithHttpInfo
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function bulkCreateOfferWithHttpInfo($bulk_ebay_offer_details_with_keys)
{
$request = $this->bulkCreateOfferRequest($bulk_ebay_offer_details_with_keys);
try {
Method publishOfferByInventoryItemGroupWithHttpInfo
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function publishOfferByInventoryItemGroupWithHttpInfo($publish_by_inventory_item_group_request)
{
$request = $this->publishOfferByInventoryItemGroupRequest($publish_by_inventory_item_group_request);
try {
Method bulkPublishOfferWithHttpInfo
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function bulkPublishOfferWithHttpInfo($bulk_offer)
{
$request = $this->bulkPublishOfferRequest($bulk_offer);
try {
Method getOfferWithHttpInfo
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getOfferWithHttpInfo($offer_id)
{
$request = $this->getOfferRequest($offer_id);
try {
Function getOffersRequest
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function getOffersRequest($format = null, $limit = null, $marketplace_id = null, $offset = null, $sku = null)
{
$resourcePath = '/offer';
$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 updateOfferWithHttpInfo
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function updateOfferWithHttpInfo($content_language, $offer_id, $ebay_offer_details_with_id)
{
$request = $this->updateOfferRequest($content_language, $offer_id, $ebay_offer_details_with_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 createOfferWithHttpInfo
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function createOfferWithHttpInfo($content_language, $ebay_offer_details_with_keys)
{
$request = $this->createOfferRequest($content_language, $ebay_offer_details_with_keys);
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 withdrawOfferWithHttpInfo
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function withdrawOfferWithHttpInfo($offer_id)
{
$request = $this->withdrawOfferRequest($offer_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 getListingFeesWithHttpInfo
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function getListingFeesWithHttpInfo($offer_keys_with_id = null)
{
$request = $this->getListingFeesRequest($offer_keys_with_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 bulkPublishOfferWithHttpInfo
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function bulkPublishOfferWithHttpInfo($bulk_offer)
{
$request = $this->bulkPublishOfferRequest($bulk_offer);
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 getOfferWithHttpInfo
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function getOfferWithHttpInfo($offer_id)
{
$request = $this->getOfferRequest($offer_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 bulkCreateOfferWithHttpInfo
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function bulkCreateOfferWithHttpInfo($bulk_ebay_offer_details_with_keys)
{
$request = $this->bulkCreateOfferRequest($bulk_ebay_offer_details_with_keys);
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 getOffersWithHttpInfo
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function getOffersWithHttpInfo($format = null, $limit = null, $marketplace_id = null, $offset = null, $sku = null)
{
$request = $this->getOffersRequest($format, $limit, $marketplace_id, $offset, $sku);
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 publishOfferWithHttpInfo
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function publishOfferWithHttpInfo($offer_id)
{
$request = $this->publishOfferRequest($offer_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 publishOfferByInventoryItemGroupWithHttpInfo
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function publishOfferByInventoryItemGroupWithHttpInfo($publish_by_inventory_item_group_request)
{
$request = $this->publishOfferByInventoryItemGroupRequest($publish_by_inventory_item_group_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
Method getOffersRequest
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function getOffersRequest($format = null, $limit = null, $marketplace_id = null, $offset = null, $sku = null)
Method getOffersWithHttpInfo
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function getOffersWithHttpInfo($format = null, $limit = null, $marketplace_id = null, $offset = null, $sku = null)
Method getOffers
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function getOffers($format = null, $limit = null, $marketplace_id = null, $offset = null, $sku = null)
Method getOffersAsync
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function getOffersAsync($format = null, $limit = null, $marketplace_id = null, $offset = null, $sku = null)
Method getOffersAsyncWithHttpInfo
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function getOffersAsyncWithHttpInfo($format = null, $limit = null, $marketplace_id = null, $offset = null, $sku = null)
Function deleteOfferWithHttpInfo
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function deleteOfferWithHttpInfo($offer_id)
{
$request = $this->deleteOfferRequest($offer_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 withdrawOfferByInventoryItemGroupWithHttpInfo
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function withdrawOfferByInventoryItemGroupWithHttpInfo($withdraw_by_inventory_item_group_request)
{
$request = $this->withdrawOfferByInventoryItemGroupRequest($withdraw_by_inventory_item_group_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 getOffersRequest($format = null, $limit = null, $marketplace_id = null, $offset = null, $sku = null)
{
$resourcePath = '/offer';
$formParams = [];
$queryParams = [];
- 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 654.
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 createOfferRequest($content_language, $ebay_offer_details_with_keys)
{
// Verify the required parameter 'content_language' is set.
if ($content_language === null || (\is_array($content_language) && count($content_language) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $content_language when calling createOffer');
- 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 576.
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 6 locations. Consider refactoring. Open
public function getOffersWithHttpInfo($format = null, $limit = null, $marketplace_id = null, $offset = null, $sku = null)
{
$request = $this->getOffersRequest($format, $limit, $marketplace_id, $offset, $sku);
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 573.
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 updateOfferWithHttpInfo($content_language, $offer_id, $ebay_offer_details_with_id)
{
$request = $this->updateOfferRequest($content_language, $offer_id, $ebay_offer_details_with_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 withdrawOfferByInventoryItemGroupRequest($withdraw_by_inventory_item_group_request)
{
// Verify the required parameter 'withdraw_by_inventory_item_group_request' is set.
if ($withdraw_by_inventory_item_group_request === null || (\is_array($withdraw_by_inventory_item_group_request) && count($withdraw_by_inventory_item_group_request) === 0)) {
throw new \InvalidArgumentException('Missing the required parameter $withdraw_by_inventory_item_group_request when calling withdrawOfferByInventoryItemGroup');
- 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 488.
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 getListingFeesRequest($offer_keys_with_id = null)
{
$resourcePath = '/offer/get_listing_fees';
$formParams = [];
$queryParams = [];
- 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 451.
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 6 locations. Consider refactoring. Open
public function getOffersAsyncWithHttpInfo($format = null, $limit = null, $marketplace_id = null, $offset = null, $sku = null)
{
$returnType = '\TNT\Ebay\Sell\Inventory\V1\Model\Offers';
$request = $this->getOffersRequest($format, $limit, $marketplace_id, $offset, $sku);
- 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 277.
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 6 locations. Consider refactoring. Open
public function getOffersAsync($format = null, $limit = null, $marketplace_id = null, $offset = null, $sku = null)
{
return $this->getOffersAsyncWithHttpInfo($format, $limit, $marketplace_id, $offset, $sku)
->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 91.
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