brandon14/ebay-sdk-php

View on GitHub

Showing 2,539 of 3,709 total issues

Method getMerchandisedProductsRequest has 88 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function getMerchandisedProductsRequest($category_id, $metric_name, $aspect_filter = null, $limit = null)
    {
        // Verify the required parameter 'category_id' is set.
        if ($category_id === null || (\is_array($category_id) && count($category_id) === 0)) {
            throw new \InvalidArgumentException('Missing the required parameter $category_id when calling getMerchandisedProducts');
Severity: Major
Found in src/Buy/MarketingBeta/V1/Api/MerchandisedProductApi.php - About 3 hrs to fix

    Method suggestItemsRequest has 88 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

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

      Method getAdGroupsRequest has 88 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

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

        Method getCharityOrgsRequest has 88 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function getCharityOrgsRequest($x_ebay_c_marketplace_id, $limit = null, $offset = null, $q = null, $registration_ids = 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 getCharityOrgs');
        Severity: Major
        Found in src/Commerce/Charity/V1/Api/CharityOrgApi.php - About 3 hrs to fix

          Method __construct has 87 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['title'] = $data['title'] ?? null;
                  $this->container['image_url'] = $data['image_url'] ?? null;
          Severity: Major
          Found in src/Buy/FeedBeta/V1/Model/Item.php - About 3 hrs to fix

            Method getAdsByInventoryReferenceRequest has 87 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

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

              Method findListingRecommendationsRequest has 87 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function findListingRecommendationsRequest($x_ebay_c_marketplace_id, $filter = null, $limit = null, $offset = null, $find_listing_recommendation_request = 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 findListingRecommendations');
              Severity: Major
              Found in src/Sell/Recommendation/V1/Api/ListingRecommendationApi.php - About 3 hrs to fix

                Method suggestBidsRequest has 86 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function suggestBidsRequest($ad_group_id, $campaign_id, $targeted_bid_request)
                    {
                        // 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 suggestBids');
                Severity: Major
                Found in src/Sell/Marketing/V1/Api/AdGroupApi.php - About 3 hrs to fix

                  Method updateBidRequest has 86 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

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

                    Method updateKeywordRequest has 86 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

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

                      Method updateAdGroupRequest has 86 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function updateAdGroupRequest($ad_group_id, $campaign_id, $update_ad_group_request)
                          {
                              // 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 updateAdGroup');
                      Severity: Major
                      Found in src/Sell/Marketing/V1/Api/AdGroupApi.php - About 3 hrs to fix

                        Method createOrReplaceSalesTaxRequest has 86 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function createOrReplaceSalesTaxRequest($country_code, $jurisdiction_id, $sales_tax_base)
                            {
                                // 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 createOrReplaceSalesTax');
                        Severity: Major
                        Found in src/Sell/Account/V1/Api/SalesTaxApi.php - About 3 hrs to fix

                          Function getEventRequest has a Cognitive Complexity of 24 (exceeds 5 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: Minor
                          Found in src/Buy/Deal/V1/Api/EventApi.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 getFileRequest has a Cognitive Complexity of 24 (exceeds 5 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: Minor
                          Found in src/Buy/Feed/V1/Api/FileApi.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 getGuestCheckoutSessionRequest has a Cognitive Complexity of 24 (exceeds 5 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: 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

                          Function getBiddingRequest has a Cognitive Complexity of 24 (exceeds 5 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: Minor
                          Found in src/Buy/OfferBeta/V1/Api/BiddingApi.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 getSellerStandardsProfileRequest has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public function getSellerStandardsProfileRequest($cycle, $program)
                              {
                                  // Verify the required parameter 'cycle' is set.
                                  if ($cycle === null || (\is_array($cycle) && count($cycle) === 0)) {
                                      throw new \InvalidArgumentException('Missing the required parameter $cycle when calling getSellerStandardsProfile');
                          Severity: Minor
                          Found in src/Sell/Analytics/V1/Api/SellerStandardsProfileApi.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 bulkUpdateNegativeKeywordRequest has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public function bulkUpdateNegativeKeywordRequest($bulk_update_negative_keyword_request)
                              {
                                  // Verify the required parameter 'bulk_update_negative_keyword_request' is set.
                                  if ($bulk_update_negative_keyword_request === null || (\is_array($bulk_update_negative_keyword_request) && count($bulk_update_negative_keyword_request) === 0)) {
                                      throw new \InvalidArgumentException('Missing the required parameter $bulk_update_negative_keyword_request when calling bulkUpdateNegativeKeyword');
                          Severity: Minor
                          Found in src/Sell/Marketing/V1/Api/NegativeKeywordApi.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 createNegativeKeywordRequest has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public function createNegativeKeywordRequest($create_negative_keyword_request)
                              {
                                  // Verify the required parameter 'create_negative_keyword_request' is set.
                                  if ($create_negative_keyword_request === null || (\is_array($create_negative_keyword_request) && count($create_negative_keyword_request) === 0)) {
                                      throw new \InvalidArgumentException('Missing the required parameter $create_negative_keyword_request when calling createNegativeKeyword');
                          Severity: Minor
                          Found in src/Sell/Marketing/V1/Api/NegativeKeywordApi.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 bulkCreateNegativeKeywordRequest has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
                          Open

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