brandon14/ebay-sdk-php

View on GitHub

Showing 2,539 of 3,709 total issues

Method getCampaignsRequest has 106 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function getCampaignsRequest($campaign_name = null, $campaign_status = null, $end_date_range = null, $funding_strategy = null, $limit = null, $offset = null, $start_date_range = null)
    {
        $resourcePath = '/ad_campaign';
        $formParams = [];
        $queryParams = [];
Severity: Major
Found in src/Sell/Marketing/V1/Api/CampaignApi.php - About 4 hrs to fix

    Function applyGuestCouponRequest has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
    Open

        public function applyGuestCouponRequest($checkout_session_id, $x_ebay_c_marketplace_id, $coupon_request = null)
        {
            // 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 applyGuestCoupon');
    Severity: Minor
    Found in src/Buy/Order/V2/Api/GuestCheckoutSessionApi.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 updateGuestQuantityRequest has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
    Open

        public function updateGuestQuantityRequest($checkout_session_id, $x_ebay_c_marketplace_id, $update_quantity = null)
        {
            // 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 updateGuestQuantity');
    Severity: Minor
    Found in src/Buy/Order/V2/Api/GuestCheckoutSessionApi.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 placeProxyBidRequest has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
    Open

        public function placeProxyBidRequest($item_id, $x_ebay_c_marketplace_id, $place_proxy_bid_request = null)
        {
            // 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 placeProxyBid');
    Severity: Minor
    Found in src/Buy/OfferBeta/V1/Api/BiddingApi.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 removeGuestCouponRequest has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
    Open

        public function removeGuestCouponRequest($checkout_session_id, $x_ebay_c_marketplace_id, $coupon_request = null)
        {
            // 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 removeGuestCoupon');
    Severity: Minor
    Found in src/Buy/Order/V2/Api/GuestCheckoutSessionApi.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 updateGuestShippingAddressRequest has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
    Open

        public function updateGuestShippingAddressRequest($checkout_session_id, $x_ebay_c_marketplace_id, $shipping_address_impl = null)
        {
            // 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 updateGuestShippingAddress');
    Severity: Minor
    Found in src/Buy/Order/V2/Api/GuestCheckoutSessionApi.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 updateGuestShippingOptionRequest has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
    Open

        public function updateGuestShippingOptionRequest($checkout_session_id, $x_ebay_c_marketplace_id, $update_shipping_option = null)
        {
            // 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 updateGuestShippingOption');
    Severity: Minor
    Found in src/Buy/Order/V2/Api/GuestCheckoutSessionApi.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 bulkUpdateKeywordRequest has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
    Open

        public function bulkUpdateKeywordRequest($campaign_id, $bulk_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 bulkUpdateKeyword');
    Severity: Minor
    Found in src/Sell/Marketing/V1/Api/KeywordApi.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 updateNegativeKeywordRequest has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
    Open

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

        public function bulkUpdateAdsBidByInventoryReferenceRequest($campaign_id, $bulk_create_ads_by_inventory_reference_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 bulkUpdateAdsBidByInventoryReference');
    Severity: Minor
    Found in src/Sell/Marketing/V1/Api/AdApi.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 bulkDeleteAdsByInventoryReferenceRequest has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
    Open

        public function bulkDeleteAdsByInventoryReferenceRequest($campaign_id, $bulk_delete_ads_by_inventory_reference_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 bulkDeleteAdsByInventoryReference');
    Severity: Minor
    Found in src/Sell/Marketing/V1/Api/AdApi.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 bulkUpdateAdsStatusByListingIdRequest has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
    Open

        public function bulkUpdateAdsStatusByListingIdRequest($campaign_id, $bulk_update_ad_status_by_listing_id_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 bulkUpdateAdsStatusByListingId');
    Severity: Minor
    Found in src/Sell/Marketing/V1/Api/AdApi.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 bulkDeleteAdsByListingIdRequest has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
    Open

        public function bulkDeleteAdsByListingIdRequest($campaign_id, $bulk_delete_ad_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 bulkDeleteAdsByListingId');
    Severity: Minor
    Found in src/Sell/Marketing/V1/Api/AdApi.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 bulkUpdateAdsBidByListingIdRequest has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
    Open

        public function bulkUpdateAdsBidByListingIdRequest($campaign_id, $bulk_create_ad_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 bulkUpdateAdsBidByListingId');
    Severity: Minor
    Found in src/Sell/Marketing/V1/Api/AdApi.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 createAdByListingIdRequest has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
    Open

        public function createAdByListingIdRequest($campaign_id, $create_ad_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 createAdByListingId');
    Severity: Minor
    Found in src/Sell/Marketing/V1/Api/AdApi.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 deleteAdsByInventoryReferenceRequest has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
    Open

        public function deleteAdsByInventoryReferenceRequest($campaign_id, $delete_ads_by_inventory_reference_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 deleteAdsByInventoryReference');
    Severity: Minor
    Found in src/Sell/Marketing/V1/Api/AdApi.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 bulkCreateAdsByInventoryReferenceRequest has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
    Open

        public function bulkCreateAdsByInventoryReferenceRequest($campaign_id, $bulk_create_ads_by_inventory_reference_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 bulkCreateAdsByInventoryReference');
    Severity: Minor
    Found in src/Sell/Marketing/V1/Api/AdApi.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 bulkCreateAdsByListingIdRequest has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
    Open

        public function bulkCreateAdsByListingIdRequest($campaign_id, $bulk_create_ad_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 bulkCreateAdsByListingId');
    Severity: Minor
    Found in src/Sell/Marketing/V1/Api/AdApi.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 createAdsByInventoryReferenceRequest has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
    Open

        public function createAdsByInventoryReferenceRequest($campaign_id, $create_ads_by_inventory_reference_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 createAdsByInventoryReference');
    Severity: Minor
    Found in src/Sell/Marketing/V1/Api/AdApi.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 updateAdRateStrategyRequest has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
    Open

        public function updateAdRateStrategyRequest($campaign_id, $update_adrate_strategy_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 updateAdRateStrategy');
    Severity: Minor
    Found in src/Sell/Marketing/V1/Api/CampaignApi.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

    Severity
    Category
    Status
    Source
    Language