brandon14/ebay-sdk-php

View on GitHub

Showing 2,539 of 3,709 total issues

Offers has 30 functions (exceeds 20 allowed). Consider refactoring.
Open

class Offers implements ModelInterface, \ArrayAccess, \JsonSerializable
{
    public const DISCRIMINATOR = null;

    /**
Severity: Minor
Found in src/Sell/Inventory/V1/Model/Offers.php - About 3 hrs to fix

    InventoryItems has 30 functions (exceeds 20 allowed). Consider refactoring.
    Open

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

      PagedEligibleItemCollection has 30 functions (exceeds 20 allowed). Consider refactoring.
      Open

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

        PagedComplianceViolationCollection has 30 functions (exceeds 20 allowed). Consider refactoring.
        Open

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

          PagedListingRecommendationCollection has 30 functions (exceeds 20 allowed). Consider refactoring.
          Open

          class PagedListingRecommendationCollection implements ModelInterface, \ArrayAccess, \JsonSerializable
          {
              public const DISCRIMINATOR = null;
          
              /**

            Address has 30 functions (exceeds 20 allowed). Consider refactoring.
            Open

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

              MigrateListingResponse has 30 functions (exceeds 20 allowed). Consider refactoring.
              Open

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

                FulfillmentStartInstruction has 30 functions (exceeds 20 allowed). Consider refactoring.
                Open

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

                  Address has 30 functions (exceeds 20 allowed). Consider refactoring.
                  Open

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

                    DisputeSummaryResponse has 30 functions (exceeds 20 allowed). Consider refactoring.
                    Open

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

                      Topic has 30 functions (exceeds 20 allowed). Consider refactoring.
                      Open

                      class Topic implements ModelInterface, \ArrayAccess, \JsonSerializable
                      {
                          public const DISCRIMINATOR = null;
                      
                          /**
                      Severity: Minor
                      Found in src/Commerce/Notification/V1/Model/Topic.php - About 3 hrs to fix

                        DestinationApi has 30 functions (exceeds 20 allowed). Consider refactoring.
                        Open

                        class DestinationApi
                        {
                            /**
                             * @var ClientInterface
                             */
                        Severity: Minor
                        Found in src/Commerce/Notification/V1/Api/DestinationApi.php - About 3 hrs to fix

                          CharitySearchResponse has 30 functions (exceeds 20 allowed). Consider refactoring.
                          Open

                          class CharitySearchResponse implements ModelInterface, \ArrayAccess, \JsonSerializable
                          {
                              public const DISCRIMINATOR = null;
                          
                              /**
                          Severity: Minor
                          Found in src/Commerce/Charity/V1/Model/CharitySearchResponse.php - About 3 hrs to fix

                            Method getCompatibilityPropertyValuesRequest has 91 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function getCompatibilityPropertyValuesRequest($category_tree_id, $compatibility_property, $category_id, $filter = null)
                                {
                                    // 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 getCompatibilityPropertyValues');
                            Severity: Major
                            Found in src/Commerce/Taxonomy/V1/Api/CategoryTreeApi.php - About 3 hrs to fix

                              File ShippingOption.php has 318 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/Browse/V1/Model/ShippingOption.php - About 3 hrs to fix

                                File PurchasedRate.php has 318 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/Model/PurchasedRate.php - About 3 hrs to fix

                                  File ItemPromotionResponse.php has 318 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/Marketing/V1/Model/ItemPromotionResponse.php - About 3 hrs to fix

                                    File SetReturnPolicyResponse.php has 318 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/Account/V1/Model/SetReturnPolicyResponse.php - About 3 hrs to fix

                                      Method __construct has 90 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function __construct(array $data = null)
                                          {
                                              $this->container['item_id'] = $data['item_id'] ?? null;
                                              $this->container['availability'] = $data['availability'] ?? null;
                                              $this->container['title'] = $data['title'] ?? null;
                                      Severity: Major
                                      Found in src/Buy/FeedBeta/V1/Model/ItemSnapshot.php - About 3 hrs to fix

                                        Function initiateGuestCheckoutSessionRequest has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
                                        Open

                                            public function initiateGuestCheckoutSessionRequest($x_ebay_c_marketplace_id, $x_ebay_c_enduserctx = null, $create_guest_checkout_session_request_v2 = 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 initiateGuestCheckoutSession');
                                        Severity: Minor
                                        Found in src/Buy/Order/V2/Api/GuestCheckoutSessionApi.php - About 3 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