brandon14/ebay-sdk-php

View on GitHub
src/Buy/Deal/V1/Api/EventItemApi.php

Summary

Maintainability
D
2 days
Test Coverage

Method getEventItemsRequest has 98 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function getEventItemsRequest($event_ids, $x_ebay_c_marketplace_id, $category_ids = null, $delivery_country = null, $limit = null, $offset = null)
    {
        // Verify the required parameter 'event_ids' is set.
        if ($event_ids === null || (\is_array($event_ids) && count($event_ids) === 0)) {
            throw new \InvalidArgumentException('Missing the required parameter $event_ids when calling getEventItems');
Severity: Major
Found in src/Buy/Deal/V1/Api/EventItemApi.php - About 3 hrs to fix

    Function getEventItemsRequest has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
    Open

        public function getEventItemsRequest($event_ids, $x_ebay_c_marketplace_id, $category_ids = null, $delivery_country = null, $limit = null, $offset = null)
        {
            // Verify the required parameter 'event_ids' is set.
            if ($event_ids === null || (\is_array($event_ids) && count($event_ids) === 0)) {
                throw new \InvalidArgumentException('Missing the required parameter $event_ids when calling getEventItems');
    Severity: Minor
    Found in src/Buy/Deal/V1/Api/EventItemApi.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

    Method getEventItemsWithHttpInfo has 53 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function getEventItemsWithHttpInfo($event_ids, $x_ebay_c_marketplace_id, $category_ids = null, $delivery_country = null, $limit = null, $offset = null)
        {
            $request = $this->getEventItemsRequest($event_ids, $x_ebay_c_marketplace_id, $category_ids, $delivery_country, $limit, $offset);
    
            try {
    Severity: Major
    Found in src/Buy/Deal/V1/Api/EventItemApi.php - About 2 hrs to fix

      File EventItemApi.php has 253 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/Deal/V1/Api/EventItemApi.php - About 2 hrs to fix

        Function getEventItemsWithHttpInfo has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
        Open

            public function getEventItemsWithHttpInfo($event_ids, $x_ebay_c_marketplace_id, $category_ids = null, $delivery_country = null, $limit = null, $offset = null)
            {
                $request = $this->getEventItemsRequest($event_ids, $x_ebay_c_marketplace_id, $category_ids, $delivery_country, $limit, $offset);
        
                try {
        Severity: Minor
        Found in src/Buy/Deal/V1/Api/EventItemApi.php - About 1 hr 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 getEventItemsAsyncWithHttpInfo has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            public function getEventItemsAsyncWithHttpInfo($event_ids, $x_ebay_c_marketplace_id, $category_ids = null, $delivery_country = null, $limit = null, $offset = null)
        Severity: Minor
        Found in src/Buy/Deal/V1/Api/EventItemApi.php - About 45 mins to fix

          Method getEventItemsAsync has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              public function getEventItemsAsync($event_ids, $x_ebay_c_marketplace_id, $category_ids = null, $delivery_country = null, $limit = null, $offset = null)
          Severity: Minor
          Found in src/Buy/Deal/V1/Api/EventItemApi.php - About 45 mins to fix

            Method getEventItems has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                public function getEventItems($event_ids, $x_ebay_c_marketplace_id, $category_ids = null, $delivery_country = null, $limit = null, $offset = null)
            Severity: Minor
            Found in src/Buy/Deal/V1/Api/EventItemApi.php - About 45 mins to fix

              Method getEventItemsRequest has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  public function getEventItemsRequest($event_ids, $x_ebay_c_marketplace_id, $category_ids = null, $delivery_country = null, $limit = null, $offset = null)
              Severity: Minor
              Found in src/Buy/Deal/V1/Api/EventItemApi.php - About 45 mins to fix

                Method getEventItemsWithHttpInfo has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    public function getEventItemsWithHttpInfo($event_ids, $x_ebay_c_marketplace_id, $category_ids = null, $delivery_country = null, $limit = null, $offset = null)
                Severity: Minor
                Found in src/Buy/Deal/V1/Api/EventItemApi.php - About 45 mins to fix

                  There are no issues that match your filters.

                  Category
                  Status