brandon14/ebay-sdk-php

View on GitHub

Showing 3,709 of 3,709 total issues

Function getInventoryItemRequest has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

    public function getInventoryItemRequest($sku)
    {
        // Verify the required parameter 'sku' is set.
        if ($sku === null || (\is_array($sku) && count($sku) === 0)) {
            throw new \InvalidArgumentException('Missing the required parameter $sku when calling getInventoryItem');
Severity: Minor
Found in src/Sell/Inventory/V1/Api/InventoryItemApi.php - About 2 hrs to fix

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');
Severity: Minor
Found in src/Sell/Inventory/V1/Api/OfferApi.php - About 2 hrs to fix

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 deleteInventoryItemRequest has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

    public function deleteInventoryItemRequest($sku)
    {
        // Verify the required parameter 'sku' is set.
        if ($sku === null || (\is_array($sku) && count($sku) === 0)) {
            throw new \InvalidArgumentException('Missing the required parameter $sku when calling deleteInventoryItem');
Severity: Minor
Found in src/Sell/Inventory/V1/Api/InventoryItemApi.php - About 2 hrs to fix

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');
Severity: Minor
Found in src/Sell/Inventory/V1/Api/OfferApi.php - About 2 hrs to fix

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 = [];
Severity: Minor
Found in src/Sell/Inventory/V1/Api/OfferApi.php - About 2 hrs to fix

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 findEligibleItemsRequest has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

    public function findEligibleItemsRequest($x_ebay_c_marketplace_id, $limit = null, $offset = null)
    {
        // Verify the required parameter 'x_ebay_c_marketplace_id' is set.
        if ($x_ebay_c_marketplace_id === null || (\is_array($x_ebay_c_marketplace_id) && count($x_ebay_c_marketplace_id) === 0)) {
            throw new \InvalidArgumentException('Missing the required parameter $x_ebay_c_marketplace_id when calling findEligibleItems');
Severity: Minor
Found in src/Sell/Negotiation/V1/Api/OfferApi.php - About 2 hrs to fix

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 getListingViolationsRequest has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

    public function getListingViolationsRequest($x_ebay_c_marketplace_id, $compliance_type = null, $offset = null, $listing_id = null, $limit = null, $filter = null)
    {
        // Verify the required parameter 'x_ebay_c_marketplace_id' is set.
        if ($x_ebay_c_marketplace_id === null || (\is_array($x_ebay_c_marketplace_id) && count($x_ebay_c_marketplace_id) === 0)) {
            throw new \InvalidArgumentException('Missing the required parameter $x_ebay_c_marketplace_id when calling getListingViolations');
Severity: Minor
Found in src/Sell/Compliance/V1/Api/ListingViolationApi.php - About 2 hrs to fix

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 getShippingFulfillmentsRequest has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

    public function getShippingFulfillmentsRequest($order_id)
    {
        // Verify the required parameter 'order_id' is set.
        if ($order_id === null || (\is_array($order_id) && count($order_id) === 0)) {
            throw new \InvalidArgumentException('Missing the required parameter $order_id when calling getShippingFulfillments');
Severity: Minor
Found in src/Sell/Fulfillment/V1/Api/ShippingFulfillmentApi.php - About 2 hrs to fix

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 getOrderRequest has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

    public function getOrderRequest($order_id, $field_groups = null)
    {
        // Verify the required parameter 'order_id' is set.
        if ($order_id === null || (\is_array($order_id) && count($order_id) === 0)) {
            throw new \InvalidArgumentException('Missing the required parameter $order_id when calling getOrder');
Severity: Minor
Found in src/Sell/Fulfillment/V1/Api/OrderApi.php - About 2 hrs to fix

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 getVideoRequest has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

    public function getVideoRequest($video_id)
    {
        // Verify the required parameter 'video_id' is set.
        if ($video_id === null || (\is_array($video_id) && count($video_id) === 0)) {
            throw new \InvalidArgumentException('Missing the required parameter $video_id when calling getVideo');
Severity: Minor
Found in src/Commerce/MediaBeta/V1/Api/VideoApi.php - About 2 hrs to fix

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 createVideoRequest has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

    public function createVideoRequest($body = null)
    {
        $resourcePath = '/video';
        $formParams = [];
        $queryParams = [];
Severity: Minor
Found in src/Commerce/MediaBeta/V1/Api/VideoApi.php - About 2 hrs to fix

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 getDefaultCategoryTreeIdRequest has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

    public function getDefaultCategoryTreeIdRequest($marketplace_id, $accept_language = null)
    {
        // Verify the required parameter 'marketplace_id' is set.
        if ($marketplace_id === null || (\is_array($marketplace_id) && count($marketplace_id) === 0)) {
            throw new \InvalidArgumentException('Missing the required parameter $marketplace_id when calling getDefaultCategoryTreeId');
Severity: Minor
Found in src/Commerce/Taxonomy/V1/Api/CategoryTreeApi.php - About 2 hrs to fix

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 getCategoryTreeRequest has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

    public function getCategoryTreeRequest($category_tree_id)
    {
        // Verify the required parameter 'category_tree_id' is set.
        if ($category_tree_id === null || (\is_array($category_tree_id) && count($category_tree_id) === 0)) {
            throw new \InvalidArgumentException('Missing the required parameter $category_tree_id when calling getCategoryTree');
Severity: Minor
Found in src/Commerce/Taxonomy/V1/Api/CategoryTreeApi.php - About 2 hrs to fix

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 getCharityOrgsRequest has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

    public function getCharityOrgsRequest($x_ebay_c_marketplace_id, $limit = null, $offset = null, $q = null, $registration_ids = null)
    {
        // Verify the required parameter 'x_ebay_c_marketplace_id' is set.
        if ($x_ebay_c_marketplace_id === null || (\is_array($x_ebay_c_marketplace_id) && count($x_ebay_c_marketplace_id) === 0)) {
            throw new \InvalidArgumentException('Missing the required parameter $x_ebay_c_marketplace_id when calling getCharityOrgs');
Severity: Minor
Found in src/Commerce/Charity/V1/Api/CharityOrgApi.php - About 2 hrs to fix

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 fetchItemAspectsRequest has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

    public function fetchItemAspectsRequest($category_tree_id)
    {
        // Verify the required parameter 'category_tree_id' is set.
        if ($category_tree_id === null || (\is_array($category_tree_id) && count($category_tree_id) === 0)) {
            throw new \InvalidArgumentException('Missing the required parameter $category_tree_id when calling fetchItemAspects');
Severity: Minor
Found in src/Commerce/Taxonomy/V1/Api/CategoryTreeApi.php - About 2 hrs to fix

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 __construct has 68 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function __construct(array $data = null)
    {
        $this->container['additional_images'] = $data['additional_images'] ?? null;
        $this->container['adult_only'] = $data['adult_only'] ?? null;
        $this->container['age_group'] = $data['age_group'] ?? null;
Severity: Major
Found in src/Buy/Browse/V1/Model/CoreItem.php - About 2 hrs to fix

    Method getInventoryLocationsRequest has 68 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function getInventoryLocationsRequest($limit = null, $offset = null)
        {
            $resourcePath = '/location';
            $formParams = [];
            $queryParams = [];
    Severity: Major
    Found in src/Sell/Inventory/V1/Api/LocationApi.php - About 2 hrs to fix

      Method getInventoryItemsRequest has 68 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function getInventoryItemsRequest($limit = null, $offset = null)
          {
              $resourcePath = '/inventory_item';
              $formParams = [];
              $queryParams = [];
      Severity: Major
      Found in src/Sell/Inventory/V1/Api/InventoryItemApi.php - About 2 hrs to fix

        File ItemSalesApi.php has 279 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        <?php
        
        /**
         * This file is part of the trollandtoad/ebay-sdk-php package.
         *
        Severity: Minor
        Found in src/Buy/MarketplaceInsightsBeta/V1/Api/ItemSalesApi.php - About 2 hrs to fix

          Method getItemsByItemGroupRequest has 67 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function getItemsByItemGroupRequest($item_group_id)
              {
                  // Verify the required parameter 'item_group_id' is set.
                  if ($item_group_id === null || (\is_array($item_group_id) && count($item_group_id) === 0)) {
                      throw new \InvalidArgumentException('Missing the required parameter $item_group_id when calling getItemsByItemGroup');
          Severity: Major
          Found in src/Buy/Browse/V1/Api/ItemApi.php - About 2 hrs to fix
            Severity
            Category
            Status
            Source
            Language