brandon14/ebay-sdk-php

View on GitHub

Showing 3,709 of 3,709 total issues

ScheduleTemplateResponse has 28 functions (exceeds 20 allowed). Consider refactoring.
Open

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

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

    ComplianceDetail has 28 functions (exceeds 20 allowed). Consider refactoring.
    Open

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

      PaymentDisputeOutcomeDetail has 28 functions (exceeds 20 allowed). Consider refactoring.
      Open

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

        Payment has 28 functions (exceeds 20 allowed). Consider refactoring.
        Open

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

          CancelRequest has 28 functions (exceeds 20 allowed). Consider refactoring.
          Open

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

            PaymentHold has 28 functions (exceeds 20 allowed). Consider refactoring.
            Open

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

              Subscription has 28 functions (exceeds 20 allowed). Consider refactoring.
              Open

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

                Method suggestKeywordsRequest has 83 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function suggestKeywordsRequest($ad_group_id, $campaign_id, $targeted_keyword_request = null)
                    {
                        // Verify the required parameter 'ad_group_id' is set.
                        if ($ad_group_id === null || (\is_array($ad_group_id) && count($ad_group_id) === 0)) {
                            throw new \InvalidArgumentException('Missing the required parameter $ad_group_id when calling suggestKeywords');
                Severity: Major
                Found in src/Sell/Marketing/V1/Api/AdGroupApi.php - About 3 hrs to fix

                  Method getFeedTypesRequest has 82 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function getFeedTypesRequest($continuation_token = null, $feed_scope = null, $limit = null, $marketplace_ids = null)
                      {
                          $resourcePath = '/feed_type';
                          $formParams = [];
                          $queryParams = [];
                  Severity: Major
                  Found in src/Buy/Feed/V1/Api/FeedTypeApi.php - About 3 hrs to fix

                    Method getTrafficReportRequest has 82 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function getTrafficReportRequest($dimension = null, $filter = null, $metric = null, $sort = null)
                        {
                            $resourcePath = '/traffic_report';
                            $formParams = [];
                            $queryParams = [];
                    Severity: Major
                    Found in src/Sell/Analytics/V1/Api/TrafficReportApi.php - About 3 hrs to fix

                      Method updateCustomPolicyRequest has 82 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function updateCustomPolicyRequest($custom_policy_id, $x_ebay_c_marketplace_id, $custom_policy_request)
                          {
                              // Verify the required parameter 'custom_policy_id' is set.
                              if ($custom_policy_id === null || (\is_array($custom_policy_id) && count($custom_policy_id) === 0)) {
                                  throw new \InvalidArgumentException('Missing the required parameter $custom_policy_id when calling updateCustomPolicy');
                      Severity: Major
                      Found in src/Sell/Account/V1/Api/CustomPolicyApi.php - About 3 hrs to fix

                        Method uploadVideoRequest has 82 lines of code (exceeds 25 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: Major
                        Found in src/Commerce/MediaBeta/V1/Api/VideoApi.php - About 3 hrs to fix

                          File ItemSummaryApi.php has 303 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/Api/ItemSummaryApi.php - About 3 hrs to fix

                            File Rate.php has 303 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/Rate.php - About 3 hrs to fix

                              File ItemPromotion.php has 303 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/ItemPromotion.php - About 3 hrs to fix

                                File ReturnPolicy.php has 303 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/ReturnPolicy.php - About 3 hrs to fix

                                  File UserScheduleResponse.php has 303 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/Feed/V1/Model/UserScheduleResponse.php - About 3 hrs to fix

                                    Function getEventItemsRequest has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                        public function getEventItemsRequest($event_ids, $x_ebay_c_marketplace_id, $category_ids = null, $delivery_country = null, $limit = null, $offset = null)
                                        {
                                            // Verify the required parameter 'event_ids' is set.
                                            if ($event_ids === null || (\is_array($event_ids) && count($event_ids) === 0)) {
                                                throw new \InvalidArgumentException('Missing the required parameter $event_ids when calling getEventItems');
                                    Severity: Minor
                                    Found in src/Buy/Deal/V1/Api/EventItemApi.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

                                    Function createFromShippingQuoteRequest has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                        public function createFromShippingQuoteRequest($create_shipment_from_quote_request)
                                        {
                                            // Verify the required parameter 'create_shipment_from_quote_request' is set.
                                            if ($create_shipment_from_quote_request === null || (\is_array($create_shipment_from_quote_request) && count($create_shipment_from_quote_request) === 0)) {
                                                throw new \InvalidArgumentException('Missing the required parameter $create_shipment_from_quote_request when calling createFromShippingQuote');
                                    Severity: Minor
                                    Found in src/Sell/Logistics/V1/Api/ShipmentApi.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

                                    Function deleteInventoryLocationRequest has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                        public function deleteInventoryLocationRequest($merchant_location_key)
                                        {
                                            // 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 deleteInventoryLocation');
                                    Severity: Minor
                                    Found in src/Sell/Account/V1/Api/LocationApi.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