brandon14/ebay-sdk-php

View on GitHub

Showing 3,709 of 3,709 total issues

Function createOrReplaceInventoryItemGroupRequest has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
Open

    public function createOrReplaceInventoryItemGroupRequest($content_language, $inventory_item_group_key, $inventory_item_group)
    {
        // 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 createOrReplaceInventoryItemGroup');
Severity: Minor
Found in src/Sell/Inventory/V1/Api/InventoryItemGroupApi.php - About 4 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 createOrReplaceInventoryItemRequest has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
Open

    public function createOrReplaceInventoryItemRequest($content_language, $sku, $inventory_item)
    {
        // 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 createOrReplaceInventoryItem');
Severity: Minor
Found in src/Sell/Inventory/V1/Api/InventoryItemApi.php - About 4 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 updateOfferRequest has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring.
Open

    public function updateOfferRequest($content_language, $offer_id, $ebay_offer_details_with_id)
    {
        // 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 updateOffer');
Severity: Minor
Found in src/Sell/Inventory/V1/Api/OfferApi.php - About 4 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

Method searchRequest has 113 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function searchRequest($x_ebay_c_marketplace_id = null, $aspect_filter = null, $category_ids = null, $fieldgroups = null, $gtin = null, $limit = null, $mpn = null, $offset = null, $q = null)
    {
        $resourcePath = '/product_summary/search';
        $formParams = [];
        $queryParams = [];
Severity: Major
Found in src/Commerce/CatalogBeta/V1/Api/ProductSummaryApi.php - About 4 hrs to fix

    MarketplaceApi has 35 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class MarketplaceApi
    {
        /**
         * @var ClientInterface
         */
    Severity: Minor
    Found in src/Sell/Metadata/V1/Api/MarketplaceApi.php - About 4 hrs to fix

      AdGroupApi has 35 functions (exceeds 20 allowed). Consider refactoring.
      Open

      class AdGroupApi
      {
          /**
           * @var ClientInterface
           */
      Severity: Minor
      Found in src/Sell/Marketing/V1/Api/AdGroupApi.php - About 4 hrs to fix

        KeywordApi has 35 functions (exceeds 20 allowed). Consider refactoring.
        Open

        class KeywordApi
        {
            /**
             * @var ClientInterface
             */
        Severity: Minor
        Found in src/Sell/Marketing/V1/Api/KeywordApi.php - About 4 hrs to fix

          NegativeKeywordApi has 35 functions (exceeds 20 allowed). Consider refactoring.
          Open

          class NegativeKeywordApi
          {
              /**
               * @var ClientInterface
               */
          Severity: Minor
          Found in src/Sell/Marketing/V1/Api/NegativeKeywordApi.php - About 4 hrs to fix

            ReturnPolicyApi has 35 functions (exceeds 20 allowed). Consider refactoring.
            Open

            class ReturnPolicyApi
            {
                /**
                 * @var ClientInterface
                 */
            Severity: Minor
            Found in src/Sell/Account/V1/Api/ReturnPolicyApi.php - About 4 hrs to fix

              FulfillmentPolicyApi has 35 functions (exceeds 20 allowed). Consider refactoring.
              Open

              class FulfillmentPolicyApi
              {
                  /**
                   * @var ClientInterface
                   */
              Severity: Minor
              Found in src/Sell/Account/V1/Api/FulfillmentPolicyApi.php - About 4 hrs to fix

                PaymentPolicyApi has 35 functions (exceeds 20 allowed). Consider refactoring.
                Open

                class PaymentPolicyApi
                {
                    /**
                     * @var ClientInterface
                     */
                Severity: Minor
                Found in src/Sell/Account/V1/Api/PaymentPolicyApi.php - About 4 hrs to fix

                  TaskApi has 35 functions (exceeds 20 allowed). Consider refactoring.
                  Open

                  class TaskApi
                  {
                      /**
                       * @var ClientInterface
                       */
                  Severity: Minor
                  Found in src/Sell/Feed/V1/Api/TaskApi.php - About 4 hrs to fix

                    Similar blocks of code found in 4 locations. Consider refactoring.
                    Open

                        protected static $getters = [
                            'adjustment_amount' => 'getAdjustmentAmount',
                            'adjustment_booking_entry' => 'getAdjustmentBookingEntry',
                            'adjustment_count' => 'getAdjustmentCount',
                            'balance_transfer_amount' => 'getBalanceTransferAmount',
                    Severity: Major
                    Found in src/Sell/Finances/V1/Model/TransactionSummaryResponse.php and 3 other locations - About 4 hrs to fix
                    src/Sell/Finances/V1/Model/TransactionSummaryResponse.php on lines 96..130
                    src/Sell/Finances/V1/Model/TransactionSummaryResponse.php on lines 203..237
                    src/Sell/Finances/V1/Model/TransactionSummaryResponse.php on lines 244..278

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 172.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 4 locations. Consider refactoring.
                    Open

                        protected static $openAPITypes = [
                            'adjustment_amount' => '\TNT\Ebay\Sell\Finances\V1\Model\Amount',
                            'adjustment_booking_entry' => 'string',
                            'adjustment_count' => 'int',
                            'balance_transfer_amount' => '\TNT\Ebay\Sell\Finances\V1\Model\Amount',
                    Severity: Major
                    Found in src/Sell/Finances/V1/Model/TransactionSummaryResponse.php and 3 other locations - About 4 hrs to fix
                    src/Sell/Finances/V1/Model/TransactionSummaryResponse.php on lines 203..237
                    src/Sell/Finances/V1/Model/TransactionSummaryResponse.php on lines 244..278
                    src/Sell/Finances/V1/Model/TransactionSummaryResponse.php on lines 285..319

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 172.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 4 locations. Consider refactoring.
                    Open

                        protected static $setters = [
                            'adjustment_amount' => 'setAdjustmentAmount',
                            'adjustment_booking_entry' => 'setAdjustmentBookingEntry',
                            'adjustment_count' => 'setAdjustmentCount',
                            'balance_transfer_amount' => 'setBalanceTransferAmount',
                    Severity: Major
                    Found in src/Sell/Finances/V1/Model/TransactionSummaryResponse.php and 3 other locations - About 4 hrs to fix
                    src/Sell/Finances/V1/Model/TransactionSummaryResponse.php on lines 96..130
                    src/Sell/Finances/V1/Model/TransactionSummaryResponse.php on lines 203..237
                    src/Sell/Finances/V1/Model/TransactionSummaryResponse.php on lines 285..319

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 172.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 4 locations. Consider refactoring.
                    Open

                        protected static $attributeMap = [
                            'adjustment_amount' => 'adjustmentAmount',
                            'adjustment_booking_entry' => 'adjustmentBookingEntry',
                            'adjustment_count' => 'adjustmentCount',
                            'balance_transfer_amount' => 'balanceTransferAmount',
                    Severity: Major
                    Found in src/Sell/Finances/V1/Model/TransactionSummaryResponse.php and 3 other locations - About 4 hrs to fix
                    src/Sell/Finances/V1/Model/TransactionSummaryResponse.php on lines 96..130
                    src/Sell/Finances/V1/Model/TransactionSummaryResponse.php on lines 244..278
                    src/Sell/Finances/V1/Model/TransactionSummaryResponse.php on lines 285..319

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 172.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Function updateInventoryLocationRequest has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public function updateInventoryLocationRequest($merchant_location_key, $inventory_location)
                        {
                            // 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 updateInventoryLocation');
                    Severity: Minor
                    Found in src/Sell/Account/V1/Api/LocationApi.php - About 4 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 createInventoryLocationRequest has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
                    Open

                        public function createInventoryLocationRequest($merchant_location_key, $inventory_location_full)
                        {
                            // 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 createInventoryLocation');
                    Severity: Minor
                    Found in src/Sell/Account/V1/Api/LocationApi.php - About 4 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 uploadVideoRequest has a Cognitive Complexity of 30 (exceeds 5 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: Minor
                    Found in src/Commerce/MediaBeta/V1/Api/VideoApi.php - About 4 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

                    Method getPromotionsRequest has 109 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function getPromotionsRequest($marketplace_id, $limit = null, $offset = null, $promotion_status = null, $promotion_type = null, $q = null, $sort = null)
                        {
                            // Verify the required parameter 'marketplace_id' is set.
                            if ($marketplace_id === null || (\is_array($marketplace_id) && count($marketplace_id) === 0)) {
                                throw new \InvalidArgumentException('Missing the required parameter $marketplace_id when calling getPromotions');
                    Severity: Major
                    Found in src/Sell/Marketing/V1/Api/PromotionApi.php - About 4 hrs to fix
                      Severity
                      Category
                      Status
                      Source
                      Language