elcodedocle/gplusraffle

View on GitHub

Showing 70 of 70 total issues

Method processRaffleAction has 203 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private function processRaffleAction($request = null){

        if ($request === null){
            $request = $this->request;
        }
Severity: Major
Found in MainController.php - About 1 day to fix

    File RaffleDAO.php has 498 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    /**
     * gplusraffle - Google API PHP OAuth 2.0 and FusionTables client based raffle
     * management system
     * 
    Severity: Minor
    Found in RaffleDAO.php - About 7 hrs to fix

      File MainController.php has 473 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      /**
       * gplusraffle - Google API PHP OAuth 2.0 and FusionTables client based raffle 
       * management system 
       * 
      Severity: Minor
      Found in MainController.php - About 7 hrs to fix

        File index.php has 438 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        <?php
        /**
         * gplusraffle - Google API PHP OAuth 2.0 and FusionTables client based raffle
         * management system
         * 
        Severity: Minor
        Found in webapp/index.php - About 6 hrs to fix

          File webappClientController.js has 354 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /*jshint bitwise: true */
          /*jslint bitwise: true */
          /*global $:false, Spinner:false, ActiveXObject:false*/
          
          /**
          Severity: Minor
          Found in webapp/webappClientController.js - About 4 hrs to fix

            Function processRaffleAction has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
            Open

                private function processRaffleAction($request = null){
            
                    if ($request === null){
                        $request = $this->request;
                    }
            Severity: Minor
            Found in MainController.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 pickWinners has 87 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function pickWinners(
                    $raffleId, 
                    $limit = null, 
                    $raffled = null, 
                    $tableId = null, 
            Severity: Major
            Found in RaffleDAO.php - About 3 hrs to fix

              Function processAdminAction has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
              Open

                  private function processAdminAction($request = null){
                      
                      if ($request === null){
                          $request = $this->request;
                      }
              Severity: Minor
              Found in MainController.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 processAdminAction has 75 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  private function processAdminAction($request = null){
                      
                      if ($request === null){
                          $request = $this->request;
                      }
              Severity: Major
              Found in MainController.php - About 3 hrs to fix

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

                function createTableBody(data){
                    "use strict";
                    var tbody, propertyName, row, index, td;
                    tbody = document.createElement('tbody');
                    for (index in data.data.rows){
                Severity: Minor
                Found in webapp/webappClientController.js - 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

                File AdminDAO.php has 286 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                <?php
                /**
                 * gplusraffle - Google API PHP OAuth 2.0 and FusionTables client based raffle 
                 * management system
                 * 
                Severity: Minor
                Found in AdminDAO.php - About 2 hrs to fix

                  Function processOk has 70 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function processOk(request,responseText,subtitle){
                      "use strict";
                      var data;
                      try {
                          data=JSON.parse(responseText);
                  Severity: Major
                  Found in webapp/webappClientController.js - About 2 hrs to fix

                    Method addRaffle has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function addRaffle(
                            $description, 
                            $userId, 
                            $created = null, 
                            $privacy = null, 
                    Severity: Major
                    Found in RaffleDAO.php - About 2 hrs to fix

                      Method getListRaffleFilterArray has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          private function getListRaffleFilterArray($userId, $isAdmin = false, $request = null){
                      
                              if ($request === null){
                                  $request = $this->request;
                              }
                      Severity: Major
                      Found in MainController.php - About 2 hrs to fix

                        Method getRaffles has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function getRaffles(
                                $raffleId = null,
                                $description = null,
                                $creatorId = null,
                                $participantId = null,
                        Severity: Major
                        Found in RaffleDAO.php - About 2 hrs to fix

                          Function getRaffles has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public function getRaffles(
                                  $raffleId = null,
                                  $description = null,
                                  $creatorId = null,
                                  $participantId = null,
                          Severity: Minor
                          Found in RaffleDAO.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 getListRaffleFilterArray has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                          Open

                              private function getListRaffleFilterArray($userId, $isAdmin = false, $request = null){
                          
                                  if ($request === null){
                                      $request = $this->request;
                                  }
                          Severity: Minor
                          Found in MainController.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 setClient has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public function setClient(
                                  $accessToken = null, 
                                  $client_id = null, 
                                  $client_secret = null, 
                                  $redirect_uri = null, 
                          Severity: Minor
                          Found in AdminDAO.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 processFail has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                          Open

                          function processFail(request,responseText,status,subtitle){
                              "use strict";
                              var data, response;
                              if(
                                  status === 404 &&
                          Severity: Minor
                          Found in webapp/webappClientController.js - 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 addRaffle has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public function addRaffle(
                                  $description, 
                                  $userId, 
                                  $created = null, 
                                  $privacy = null, 
                          Severity: Minor
                          Found in RaffleDAO.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

                          Severity
                          Category
                          Status
                          Source
                          Language