brandon14/ebay-sdk-php

View on GitHub

Showing 3,709 of 3,709 total issues

Method getEventRequest has 70 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function getEventRequest($x_ebay_c_marketplace_id, $event_id)
    {
        // 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 getEvent');
Severity: Major
Found in src/Buy/Deal/V1/Api/EventApi.php - About 2 hrs to fix

    Method getFileRequest has 70 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function getFileRequest($file_id, $x_ebay_c_marketplace_id)
        {
            // Verify the required parameter 'file_id' is set.
            if ($file_id === null || (\is_array($file_id) && count($file_id) === 0)) {
                throw new \InvalidArgumentException('Missing the required parameter $file_id when calling getFile');
    Severity: Major
    Found in src/Buy/Feed/V1/Api/FileApi.php - About 2 hrs to fix

      Method getBiddingRequest has 70 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function getBiddingRequest($item_id, $x_ebay_c_marketplace_id)
          {
              // Verify the required parameter 'item_id' is set.
              if ($item_id === null || (\is_array($item_id) && count($item_id) === 0)) {
                  throw new \InvalidArgumentException('Missing the required parameter $item_id when calling getBidding');
      Severity: Major
      Found in src/Buy/OfferBeta/V1/Api/BiddingApi.php - About 2 hrs to fix

        Method getGuestCheckoutSessionRequest has 70 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function getGuestCheckoutSessionRequest($checkout_session_id, $x_ebay_c_marketplace_id)
            {
                // Verify the required parameter 'checkout_session_id' is set.
                if ($checkout_session_id === null || (\is_array($checkout_session_id) && count($checkout_session_id) === 0)) {
                    throw new \InvalidArgumentException('Missing the required parameter $checkout_session_id when calling getGuestCheckoutSession');
        Severity: Major
        Found in src/Buy/Order/V2/Api/GuestCheckoutSessionApi.php - About 2 hrs to fix

          Method updateShippingCostRequest has 70 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function updateShippingCostRequest($rate_table_id, $rate_table_update = null)
              {
                  // Verify the required parameter 'rate_table_id' is set.
                  if ($rate_table_id === null || (\is_array($rate_table_id) && count($rate_table_id) === 0)) {
                      throw new \InvalidArgumentException('Missing the required parameter $rate_table_id when calling updateShippingCost');
          Severity: Major
          Found in src/Sell/Account/V2/Api/RateTableApi.php - About 2 hrs to fix

            Method getCustomPoliciesRequest has 70 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function getCustomPoliciesRequest($x_ebay_c_marketplace_id, $policy_types = 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 getCustomPolicies');
            Severity: Major
            Found in src/Sell/Account/V1/Api/CustomPolicyApi.php - About 2 hrs to fix

              Method getAdvertisingEligibilityRequest has 70 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function getAdvertisingEligibilityRequest($x_ebay_c_marketplace_id, $program_types = 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 getAdvertisingEligibility');
              Severity: Major
              Found in src/Sell/Account/V1/Api/AdvertisingEligibilityApi.php - About 2 hrs to fix

                Method issueRefundRequest has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function issueRefundRequest($order_id, $issue_refund_request = 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 issueRefund');
                Severity: Major
                Found in src/Sell/Fulfillment/V1/Api/OrderApi.php - About 2 hrs to fix

                  Method getCharityOrgRequest has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

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

                    Method getCharityOrgByLegacyIdRequest has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function getCharityOrgByLegacyIdRequest($x_ebay_c_marketplace_id, $legacy_charity_org_id)
                        {
                            // 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 getCharityOrgByLegacyId');
                    Severity: Major
                    Found in src/Commerce/Charity/V1/Api/CharityOrgApi.php - About 2 hrs to fix

                      Method getGuestPurchaseOrderRequest has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function getGuestPurchaseOrderRequest($purchase_order_id)
                          {
                              // Verify the required parameter 'purchase_order_id' is set.
                              if ($purchase_order_id === null || (\is_array($purchase_order_id) && count($purchase_order_id) === 0)) {
                                  throw new \InvalidArgumentException('Missing the required parameter $purchase_order_id when calling getGuestPurchaseOrder');
                      Severity: Major
                      Found in src/Buy/Order/V2/Api/GuestPurchaseOrderApi.php - About 2 hrs to fix

                        Method initiateGuestCheckoutSessionRequest has 69 lines of code (exceeds 25 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: Major
                        Found in src/Buy/Order/V2/Api/GuestCheckoutSessionApi.php - About 2 hrs to fix

                          Method createShippingQuoteRequest has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function createShippingQuoteRequest($x_ebay_c_marketplace_id, $shipping_quote_request)
                              {
                                  // 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 createShippingQuote');
                          Severity: Major
                          Found in src/Sell/Logistics/V1/Api/ShippingQuoteApi.php - About 2 hrs to fix

                            Method createItemDraftRequest has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function createItemDraftRequest($x_ebay_c_marketplace_id, $content_language = null, $item_draft = 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 createItemDraft');
                            Severity: Major
                            Found in src/Sell/ListingBeta/V1/Api/ItemDraftApi.php - About 2 hrs to fix

                              Method createCustomerServiceMetricTaskRequest has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function createCustomerServiceMetricTaskRequest($accept_language, $create_service_metrics_task_request)
                                  {
                                      // Verify the required parameter 'accept_language' is set.
                                      if ($accept_language === null || (\is_array($accept_language) && count($accept_language) === 0)) {
                                          throw new \InvalidArgumentException('Missing the required parameter $accept_language when calling createCustomerServiceMetricTask');
                              Severity: Major
                              Found in src/Sell/Feed/V1/Api/CustomerServiceMetricTaskApi.php - About 2 hrs to fix

                                Method createOfferRequest has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function createOfferRequest($content_language, $ebay_offer_details_with_keys)
                                    {
                                        // Verify the required parameter 'content_language' is set.
                                        if ($content_language === null || (\is_array($content_language) && count($content_language) === 0)) {
                                            throw new \InvalidArgumentException('Missing the required parameter $content_language when calling createOffer');
                                Severity: Major
                                Found in src/Sell/Inventory/V1/Api/OfferApi.php - About 2 hrs to fix

                                  Method uploadEvidenceFileRequest has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

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

                                    Method getPaymentDisputeRequest has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

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

                                      Method getActivitiesRequest has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

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

                                        Function getItemsByItemGroupRequest has a Cognitive Complexity of 20 (exceeds 5 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: Minor
                                        Found in src/Buy/Browse/V1/Api/ItemApi.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

                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language