brandon14/ebay-sdk-php

View on GitHub

Showing 2,539 of 3,709 total issues

Function sanitizeForSerialization has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
Open

    public static function sanitizeForSerialization($data, $type = null, $format = null)
    {
        if (\is_scalar($data) || $data === null) {
            return $data;
        }
Severity: Minor
Found in src/Commerce/MediaBeta/V1/ObjectSerializer.php - About 5 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 sanitizeForSerialization has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
Open

    public static function sanitizeForSerialization($data, $type = null, $format = null)
    {
        if (\is_scalar($data) || $data === null) {
            return $data;
        }
Severity: Minor
Found in src/Commerce/Charity/V1/ObjectSerializer.php - About 5 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 sanitizeForSerialization has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
Open

    public static function sanitizeForSerialization($data, $type = null, $format = null)
    {
        if (\is_scalar($data) || $data === null) {
            return $data;
        }
Severity: Minor
Found in src/Commerce/Taxonomy/V1/ObjectSerializer.php - About 5 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

File TopicApi.php has 392 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

/**
 * This file is part of the trollandtoad/ebay-sdk-php package.
 *
Severity: Minor
Found in src/Commerce/Notification/V1/Api/TopicApi.php - About 5 hrs to fix

    GuestCheckoutSessionApi has 40 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class GuestCheckoutSessionApi
    {
        /**
         * @var ClientInterface
         */
    Severity: Minor
    Found in src/Buy/Order/V2/Api/GuestCheckoutSessionApi.php - About 5 hrs to fix

      ClientDetails has 40 functions (exceeds 20 allowed). Consider refactoring.
      Open

      class ClientDetails implements ModelInterface, \ArrayAccess, \JsonSerializable
      {
          public const DISCRIMINATOR = null;
      
          /**
      Severity: Minor
      Found in src/Developer/ClientRegistration/V1/Model/ClientDetails.php - About 5 hrs to fix

        Payout has 40 functions (exceeds 20 allowed). Consider refactoring.
        Open

        class Payout implements ModelInterface, \ArrayAccess, \JsonSerializable
        {
            public const DISCRIMINATOR = null;
        
            /**
        Severity: Minor
        Found in src/Sell/Finances/V1/Model/Payout.php - About 5 hrs to fix

          ItemPriceMarkdown has 40 functions (exceeds 20 allowed). Consider refactoring.
          Open

          class ItemPriceMarkdown implements ModelInterface, \ArrayAccess, \JsonSerializable
          {
              public const DISCRIMINATOR = null;
          
              /**
          Severity: Minor
          Found in src/Sell/Marketing/V1/Model/ItemPriceMarkdown.php - About 5 hrs to fix

            PromotionDetail has 40 functions (exceeds 20 allowed). Consider refactoring.
            Open

            class PromotionDetail implements ModelInterface, \ArrayAccess, \JsonSerializable
            {
                public const DISCRIMINATOR = null;
            
                /**
            Severity: Minor
            Found in src/Sell/Marketing/V1/Model/PromotionDetail.php - About 5 hrs to fix

              ListingDetail has 40 functions (exceeds 20 allowed). Consider refactoring.
              Open

              class ListingDetail implements ModelInterface, \ArrayAccess, \JsonSerializable
              {
                  public const DISCRIMINATOR = null;
              
                  /**
              Severity: Minor
              Found in src/Sell/Marketing/V1/Model/ListingDetail.php - About 5 hrs to fix

                CreateReportTask has 40 functions (exceeds 20 allowed). Consider refactoring.
                Open

                class CreateReportTask implements ModelInterface, \ArrayAccess, \JsonSerializable
                {
                    public const DISCRIMINATOR = null;
                
                    /**
                Severity: Minor
                Found in src/Sell/Marketing/V1/Model/CreateReportTask.php - About 5 hrs to fix

                  LocationApi has 40 functions (exceeds 20 allowed). Consider refactoring.
                  Open

                  class LocationApi
                  {
                      /**
                       * @var ClientInterface
                       */
                  Severity: Minor
                  Found in src/Sell/Account/V1/Api/LocationApi.php - About 5 hrs to fix

                    FulfillmentPolicy has 40 functions (exceeds 20 allowed). Consider refactoring.
                    Open

                    class FulfillmentPolicy implements ModelInterface, \ArrayAccess, \JsonSerializable
                    {
                        public const DISCRIMINATOR = null;
                    
                        /**
                    Severity: Minor
                    Found in src/Sell/Account/V1/Model/FulfillmentPolicy.php - About 5 hrs to fix

                      LocationApi has 40 functions (exceeds 20 allowed). Consider refactoring.
                      Open

                      class LocationApi
                      {
                          /**
                           * @var ClientInterface
                           */
                      Severity: Minor
                      Found in src/Sell/Inventory/V1/Api/LocationApi.php - About 5 hrs to fix

                        InventoryItemApi has 40 functions (exceeds 20 allowed). Consider refactoring.
                        Open

                        class InventoryItemApi
                        {
                            /**
                             * @var ClientInterface
                             */
                        Severity: Minor
                        Found in src/Sell/Inventory/V1/Api/InventoryItemApi.php - About 5 hrs to fix

                          Product has 40 functions (exceeds 20 allowed). Consider refactoring.
                          Open

                          class Product implements ModelInterface, \ArrayAccess, \JsonSerializable
                          {
                              public const DISCRIMINATOR = null;
                          
                              /**
                          Severity: Minor
                          Found in src/Sell/Inventory/V1/Model/Product.php - About 5 hrs to fix

                            Offer has 40 functions (exceeds 20 allowed). Consider refactoring.
                            Open

                            class Offer implements ModelInterface, \ArrayAccess, \JsonSerializable
                            {
                                public const DISCRIMINATOR = null;
                            
                                /**
                            Severity: Minor
                            Found in src/Sell/Negotiation/V1/Model/Offer.php - About 5 hrs to fix

                              File ShippingQuoteApi.php has 387 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/Sell/Logistics/V1/Api/ShippingQuoteApi.php - About 5 hrs to fix

                                File SellerStandardsProfileApi.php has 382 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/Sell/Analytics/V1/Api/SellerStandardsProfileApi.php - About 5 hrs to fix

                                  Function getItemPriorityFeedRequest has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      public function getItemPriorityFeedRequest($accept, $x_ebay_c_marketplace_id, $range, $category_id, $date)
                                      {
                                          // Verify the required parameter 'accept' is set.
                                          if ($accept === null || (\is_array($accept) && count($accept) === 0)) {
                                              throw new \InvalidArgumentException('Missing the required parameter $accept when calling getItemPriorityFeed');
                                  Severity: Minor
                                  Found in src/Buy/FeedBeta/V1/Api/ItemPriorityApi.php - About 5 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

                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language