brandon14/ebay-sdk-php

View on GitHub
src/Buy/Browse/V1/Api/ShoppingCartApi.php

Summary

Maintainability
F
6 days
Test Coverage

File ShoppingCartApi.php has 698 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

/**
 * This file is part of the trollandtoad/ebay-sdk-php package.
 *
Severity: Major
Found in src/Buy/Browse/V1/Api/ShoppingCartApi.php - About 1 day to fix

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

        public function removeItemRequest($remove_cart_item_input = null)
        {
            $resourcePath = '/shopping_cart/remove_item';
            $formParams = [];
            $queryParams = [];
    Severity: Minor
    Found in src/Buy/Browse/V1/Api/ShoppingCartApi.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 updateQuantityRequest has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
    Open

        public function updateQuantityRequest($update_cart_item_input = null)
        {
            $resourcePath = '/shopping_cart/update_quantity';
            $formParams = [];
            $queryParams = [];
    Severity: Minor
    Found in src/Buy/Browse/V1/Api/ShoppingCartApi.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 addItemRequest has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
    Open

        public function addItemRequest($add_cart_item_input = null)
        {
            $resourcePath = '/shopping_cart/add_item';
            $formParams = [];
            $queryParams = [];
    Severity: Minor
    Found in src/Buy/Browse/V1/Api/ShoppingCartApi.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

    ShoppingCartApi has 25 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class ShoppingCartApi
    {
        /**
         * @var ClientInterface
         */
    Severity: Minor
    Found in src/Buy/Browse/V1/Api/ShoppingCartApi.php - About 2 hrs to fix

      Method removeItemRequest has 63 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function removeItemRequest($remove_cart_item_input = null)
          {
              $resourcePath = '/shopping_cart/remove_item';
              $formParams = [];
              $queryParams = [];
      Severity: Major
      Found in src/Buy/Browse/V1/Api/ShoppingCartApi.php - About 2 hrs to fix

        Method addItemRequest has 63 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function addItemRequest($add_cart_item_input = null)
            {
                $resourcePath = '/shopping_cart/add_item';
                $formParams = [];
                $queryParams = [];
        Severity: Major
        Found in src/Buy/Browse/V1/Api/ShoppingCartApi.php - About 2 hrs to fix

          Method updateQuantityRequest has 63 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function updateQuantityRequest($update_cart_item_input = null)
              {
                  $resourcePath = '/shopping_cart/update_quantity';
                  $formParams = [];
                  $queryParams = [];
          Severity: Major
          Found in src/Buy/Browse/V1/Api/ShoppingCartApi.php - About 2 hrs to fix

            Method getShoppingCartRequest has 57 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function getShoppingCartRequest()
                {
                    $resourcePath = '/shopping_cart/';
                    $formParams = [];
                    $queryParams = [];
            Severity: Major
            Found in src/Buy/Browse/V1/Api/ShoppingCartApi.php - About 2 hrs to fix

              Function getShoppingCartRequest has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function getShoppingCartRequest()
                  {
                      $resourcePath = '/shopping_cart/';
                      $formParams = [];
                      $queryParams = [];
              Severity: Minor
              Found in src/Buy/Browse/V1/Api/ShoppingCartApi.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

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

                  public function addItemWithHttpInfo($add_cart_item_input = null)
                  {
                      $request = $this->addItemRequest($add_cart_item_input);
              
                      try {
              Severity: Major
              Found in src/Buy/Browse/V1/Api/ShoppingCartApi.php - About 2 hrs to fix

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

                    public function updateQuantityWithHttpInfo($update_cart_item_input = null)
                    {
                        $request = $this->updateQuantityRequest($update_cart_item_input);
                
                        try {
                Severity: Major
                Found in src/Buy/Browse/V1/Api/ShoppingCartApi.php - About 2 hrs to fix

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

                      public function getShoppingCartWithHttpInfo()
                      {
                          $request = $this->getShoppingCartRequest();
                  
                          try {
                  Severity: Major
                  Found in src/Buy/Browse/V1/Api/ShoppingCartApi.php - About 2 hrs to fix

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

                        public function removeItemWithHttpInfo($remove_cart_item_input = null)
                        {
                            $request = $this->removeItemRequest($remove_cart_item_input);
                    
                            try {
                    Severity: Major
                    Found in src/Buy/Browse/V1/Api/ShoppingCartApi.php - About 2 hrs to fix

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

                          public function removeItemWithHttpInfo($remove_cart_item_input = null)
                          {
                              $request = $this->removeItemRequest($remove_cart_item_input);
                      
                              try {
                      Severity: Minor
                      Found in src/Buy/Browse/V1/Api/ShoppingCartApi.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

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

                          public function updateQuantityWithHttpInfo($update_cart_item_input = null)
                          {
                              $request = $this->updateQuantityRequest($update_cart_item_input);
                      
                              try {
                      Severity: Minor
                      Found in src/Buy/Browse/V1/Api/ShoppingCartApi.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

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

                          public function addItemWithHttpInfo($add_cart_item_input = null)
                          {
                              $request = $this->addItemRequest($add_cart_item_input);
                      
                              try {
                      Severity: Minor
                      Found in src/Buy/Browse/V1/Api/ShoppingCartApi.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

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

                          public function getShoppingCartWithHttpInfo()
                          {
                              $request = $this->getShoppingCartRequest();
                      
                              try {
                      Severity: Minor
                      Found in src/Buy/Browse/V1/Api/ShoppingCartApi.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

                      There are no issues that match your filters.

                      Category
                      Status