brandon14/ebay-sdk-php

View on GitHub

Showing 2,539 of 3,709 total issues

NegativeKeywordApi has 35 functions (exceeds 20 allowed). Consider refactoring.
Open

class NegativeKeywordApi
{
    /**
     * @var ClientInterface
     */
Severity: Minor
Found in src/Sell/Marketing/V1/Api/NegativeKeywordApi.php - About 4 hrs to fix

    KeywordApi has 35 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class KeywordApi
    {
        /**
         * @var ClientInterface
         */
    Severity: Minor
    Found in src/Sell/Marketing/V1/Api/KeywordApi.php - About 4 hrs to fix

      FulfillmentPolicyApi has 35 functions (exceeds 20 allowed). Consider refactoring.
      Open

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

        PaymentPolicyApi has 35 functions (exceeds 20 allowed). Consider refactoring.
        Open

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

          ReturnPolicyApi has 35 functions (exceeds 20 allowed). Consider refactoring.
          Open

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

            TaskApi has 35 functions (exceeds 20 allowed). Consider refactoring.
            Open

            class TaskApi
            {
                /**
                 * @var ClientInterface
                 */
            Severity: Minor
            Found in src/Sell/Feed/V1/Api/TaskApi.php - About 4 hrs to fix

              Function createInventoryLocationRequest has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function createInventoryLocationRequest($merchant_location_key, $inventory_location_full)
                  {
                      // Verify the required parameter 'merchant_location_key' is set.
                      if ($merchant_location_key === null || (\is_array($merchant_location_key) && count($merchant_location_key) === 0)) {
                          throw new \InvalidArgumentException('Missing the required parameter $merchant_location_key when calling createInventoryLocation');
              Severity: Minor
              Found in src/Sell/Account/V1/Api/LocationApi.php - About 4 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 updateInventoryLocationRequest has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function updateInventoryLocationRequest($merchant_location_key, $inventory_location)
                  {
                      // Verify the required parameter 'merchant_location_key' is set.
                      if ($merchant_location_key === null || (\is_array($merchant_location_key) && count($merchant_location_key) === 0)) {
                          throw new \InvalidArgumentException('Missing the required parameter $merchant_location_key when calling updateInventoryLocation');
              Severity: Minor
              Found in src/Sell/Account/V1/Api/LocationApi.php - About 4 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 uploadVideoRequest has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function uploadVideoRequest($content_type, $video_id, $content_length = null, $content_range = null, $body = null)
                  {
                      // Verify the required parameter 'content_type' is set.
                      if ($content_type === null || (\is_array($content_type) && count($content_type) === 0)) {
                          throw new \InvalidArgumentException('Missing the required parameter $content_type when calling uploadVideo');
              Severity: Minor
              Found in src/Commerce/MediaBeta/V1/Api/VideoApi.php - About 4 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 getPromotionsRequest has 109 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function getPromotionsRequest($marketplace_id, $limit = null, $offset = null, $promotion_status = null, $promotion_type = null, $q = null, $sort = 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 getPromotions');
              Severity: Major
              Found in src/Sell/Marketing/V1/Api/PromotionApi.php - About 4 hrs to fix

                File OrderLineItemV2.php has 348 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/Order/V2/Model/OrderLineItemV2.php - About 4 hrs to fix

                  File EbayOfferDetailsWithId.php has 348 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/Inventory/V1/Model/EbayOfferDetailsWithId.php - About 4 hrs to fix

                    Error has 34 functions (exceeds 20 allowed). Consider refactoring.
                    Open

                    class Error implements ModelInterface, \ArrayAccess, \JsonSerializable
                    {
                        public const DISCRIMINATOR = null;
                    
                        /**
                    Severity: Minor
                    Found in src/Buy/Browse/V1/Model/Error.php - About 4 hrs to fix

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

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

                        Error has 34 functions (exceeds 20 allowed). Consider refactoring.
                        Open

                        class Error implements ModelInterface, \ArrayAccess, \JsonSerializable
                        {
                            public const DISCRIMINATOR = null;
                        
                            /**
                        Severity: Minor
                        Found in src/Buy/Deal/V1/Model/Error.php - About 4 hrs to fix

                          Error has 34 functions (exceeds 20 allowed). Consider refactoring.
                          Open

                          class Error implements ModelInterface, \ArrayAccess, \JsonSerializable
                          {
                              public const DISCRIMINATOR = null;
                          
                              /**
                          Severity: Minor
                          Found in src/Buy/FeedBeta/V1/Model/Error.php - About 4 hrs to fix

                            Error has 34 functions (exceeds 20 allowed). Consider refactoring.
                            Open

                            class Error implements ModelInterface, \ArrayAccess, \JsonSerializable
                            {
                                public const DISCRIMINATOR = null;
                            
                                /**
                            Severity: Minor
                            Found in src/Buy/OfferBeta/V1/Model/Error.php - About 4 hrs to fix

                              Bidding has 34 functions (exceeds 20 allowed). Consider refactoring.
                              Open

                              class Bidding implements ModelInterface, \ArrayAccess, \JsonSerializable
                              {
                                  public const DISCRIMINATOR = null;
                              
                                  /**
                              Severity: Minor
                              Found in src/Buy/OfferBeta/V1/Model/Bidding.php - About 4 hrs to fix

                                Error has 34 functions (exceeds 20 allowed). Consider refactoring.
                                Open

                                class Error implements ModelInterface, \ArrayAccess, \JsonSerializable
                                {
                                    public const DISCRIMINATOR = null;
                                
                                    /**
                                Severity: Minor
                                Found in src/Buy/MarketingBeta/V1/Model/Error.php - About 4 hrs to fix

                                  Error has 34 functions (exceeds 20 allowed). Consider refactoring.
                                  Open

                                  class Error implements ModelInterface, \ArrayAccess, \JsonSerializable
                                  {
                                      public const DISCRIMINATOR = null;
                                  
                                      /**
                                  Severity: Minor
                                  Found in src/Buy/MarketplaceInsightsBeta/V1/Model/Error.php - About 4 hrs to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language