brandon14/ebay-sdk-php

View on GitHub

Showing 3,709 of 3,709 total issues

Function createSubscriptionRequest has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
Open

    public function createSubscriptionRequest($create_subscription_request = null)
    {
        $resourcePath = '/subscription';
        $formParams = [];
        $queryParams = [];
Severity: Minor
Found in src/Commerce/Notification/V1/Api/SubscriptionApi.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

Function getPublicKeyRequest has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
Open

    public function getPublicKeyRequest($public_key_id)
    {
        // Verify the required parameter 'public_key_id' is set.
        if ($public_key_id === null || (\is_array($public_key_id) && count($public_key_id) === 0)) {
            throw new \InvalidArgumentException('Missing the required parameter $public_key_id when calling getPublicKey');
Severity: Minor
Found in src/Commerce/Notification/V1/Api/PublicKeyApi.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

Function updateConfigRequest has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
Open

    public function updateConfigRequest($config = null)
    {
        $resourcePath = '/config';
        $formParams = [];
        $queryParams = [];
Severity: Minor
Found in src/Commerce/Notification/V1/Api/ConfigApi.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

File LineItem.php has 288 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/LineItem.php - About 2 hrs to fix

    File Shipment.php has 288 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/Shipment.php - About 2 hrs to fix

      File SetFulfillmentPolicyResponse.php has 288 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/SetFulfillmentPolicyResponse.php - About 2 hrs to fix

        File ReturnPolicyRequest.php has 288 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/ReturnPolicyRequest.php - About 2 hrs to fix

          File ProductSummary.php has 288 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/CatalogBeta/V1/Model/ProductSummary.php - About 2 hrs to fix

            Method getItemGroupFeedWithHttpInfo has 72 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function getItemGroupFeedWithHttpInfo($accept, $x_ebay_c_marketplace_id, $feed_scope, $category_id, $range = null, $date = null)
                {
                    $request = $this->getItemGroupFeedRequest($accept, $x_ebay_c_marketplace_id, $feed_scope, $category_id, $range, $date);
            
                    try {
            Severity: Major
            Found in src/Buy/FeedBeta/V1/Api/ItemGroupApi.php - About 2 hrs to fix

              Method getItemFeedWithHttpInfo has 72 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function getItemFeedWithHttpInfo($accept, $x_ebay_c_marketplace_id, $range, $feed_scope, $category_id, $date = null)
                  {
                      $request = $this->getItemFeedRequest($accept, $x_ebay_c_marketplace_id, $range, $feed_scope, $category_id, $date);
              
                      try {
              Severity: Major
              Found in src/Buy/FeedBeta/V1/Api/ItemApi.php - About 2 hrs to fix

                Method getItemPriorityFeedWithHttpInfo has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function getItemPriorityFeedWithHttpInfo($accept, $x_ebay_c_marketplace_id, $range, $category_id, $date)
                    {
                        $request = $this->getItemPriorityFeedRequest($accept, $x_ebay_c_marketplace_id, $range, $category_id, $date);
                
                        try {
                Severity: Major
                Found in src/Buy/FeedBeta/V1/Api/ItemPriorityApi.php - About 2 hrs to fix

                  Method getItemSnapshotFeedWithHttpInfo has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function getItemSnapshotFeedWithHttpInfo($accept, $x_ebay_c_marketplace_id, $range, $category_id, $snapshot_date)
                      {
                          $request = $this->getItemSnapshotFeedRequest($accept, $x_ebay_c_marketplace_id, $range, $category_id, $snapshot_date);
                  
                          try {
                  Severity: Major
                  Found in src/Buy/FeedBeta/V1/Api/ItemSnapshotApi.php - About 2 hrs to fix

                    Method downloadFileWithHttpInfo has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function downloadFileWithHttpInfo($file_id, $x_ebay_c_marketplace_id, $range = null)
                        {
                            $request = $this->downloadFileRequest($file_id, $x_ebay_c_marketplace_id, $range);
                    
                            try {
                    Severity: Major
                    Found in src/Buy/Feed/V1/Api/FileApi.php - About 2 hrs to fix

                      Method deleteInventoryLocationRequest has 72 lines of code (exceeds 25 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: Major
                      Found in src/Sell/Account/V1/Api/LocationApi.php - About 2 hrs to fix

                        Method disableInventoryLocationRequest has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function disableInventoryLocationRequest($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 disableInventoryLocation');
                        Severity: Major
                        Found in src/Sell/Account/V1/Api/LocationApi.php - About 2 hrs to fix

                          Method enableInventoryLocationRequest has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function enableInventoryLocationRequest($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 enableInventoryLocation');
                          Severity: Major
                          Found in src/Sell/Account/V1/Api/LocationApi.php - About 2 hrs to fix

                            Method createCustomPolicyRequest has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

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

                              Method getInventoryLocationRequest has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function getInventoryLocationRequest($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 getInventoryLocation');
                              Severity: Major
                              Found in src/Sell/Account/V1/Api/LocationApi.php - About 2 hrs to fix

                                Method getSalesTaxJurisdictionsRequest has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

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

                                  Method createOrReplaceInventoryItemGroupWithHttpInfo has 72 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function createOrReplaceInventoryItemGroupWithHttpInfo($content_language, $inventory_item_group_key, $inventory_item_group)
                                      {
                                          $request = $this->createOrReplaceInventoryItemGroupRequest($content_language, $inventory_item_group_key, $inventory_item_group);
                                  
                                          try {
                                  Severity: Major
                                  Found in src/Sell/Inventory/V1/Api/InventoryItemGroupApi.php - About 2 hrs to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language