elcodedocle/gplusraffle

View on GitHub

Showing 70 of 70 total issues

Function createTableBody has 47 lines of code (exceeds 25 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 1 hr to fix

    Method __construct has 45 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function __construct(
            $client_id = null,
            $client_secret = null,
            $redirect_uri = null,
            $adminId = null, 
    Severity: Minor
    Found in AdminDAO.php - About 1 hr to fix

      Function processOk has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
      Open

      function processOk(request,responseText,subtitle){
          "use strict";
          var data;
          try {
              data=JSON.parse(responseText);
      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 pickWinners has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
      Open

          public function pickWinners(
              $raffleId, 
              $limit = null, 
              $raffled = null, 
              $tableId = 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

      Function getResultsForRaffleId has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
      Open

          public function getResultsForRaffleId(
              $raffleId, 
              $tableId = null,
              $userIdAndIdField = null,
              $fusionTablesService = 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

      Method __construct has 14 arguments (exceeds 4 allowed). Consider refactoring.
      Open

              $request,
              $client_id = null,
              $client_secret = null,
              $redirect_uri = null,
              $admin_redirect_uri = null,
      Severity: Major
      Found in MainController.php - About 1 hr to fix

        Method processUserAction has 43 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            private function processUserAction($request = null){
        
                if ($request === null){
                    $request = $this->request;
                }
        Severity: Minor
        Found in MainController.php - About 1 hr to fix

          Method getResultsForRaffleId has 40 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function getResultsForRaffleId(
                  $raffleId, 
                  $tableId = null,
                  $userIdAndIdField = null,
                  $fusionTablesService = null
          Severity: Minor
          Found in RaffleDAO.php - About 1 hr to fix

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

                public function readAdminSettings($fileName = null){
                    if ($fileName === null) { $fileName = $this->fileName; }
                    if (file_exists($fileName)){
                        require $fileName;
                        if (!isset($settings)||!is_array($settings)){
            Severity: Minor
            Found in AdminDAO.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 requestAndProcessPageJSONData has 39 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function requestAndProcessPageJSONData(request){
                "use strict";
                var xmlhttp, //intervalID = window.setInterval(processingDots,1000), 
                    spinnerSettings, spinner, params, subtitle;
                if (request.hasOwnProperty('subtitle')){
            Severity: Minor
            Found in webapp/webappClientController.js - About 1 hr to fix

              Method saveAdminSettings has 37 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function saveAdminSettings(
                      $adminId = null, 
                      $adminToken = null, 
                      $tableIds = null, 
                      $fileName = null
              Severity: Minor
              Found in AdminDAO.php - About 1 hr to fix

                Method createTables has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function createTables(
                        $client = null,
                        $tableSchema = null,
                        $debug = null
                    ){
                Severity: Minor
                Found in AdminDAO.php - About 1 hr to fix

                  Function saveAdminSettings has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function saveAdminSettings(
                          $adminId = null, 
                          $adminToken = null, 
                          $tableIds = null, 
                          $fileName = null
                  Severity: Minor
                  Found in AdminDAO.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 __construct has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function __construct(
                          $client_id = null,
                          $client_secret = null,
                          $redirect_uri = null,
                          $adminId = null, 
                  Severity: Minor
                  Found in AdminDAO.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 getAuthenticationWebView has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function getAuthenticationWebView($authUrl,$debugData = null){
                          ob_start();
                  ?><!doctype html>
                  <html>
                  <head>
                  Severity: Minor
                  Found in User.php - About 1 hr to fix

                    Method deleteRaffle has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function deleteRaffle(
                            $raffleId, 
                            $tableIds = null, 
                            $fusionTablesService = null
                        ){
                    Severity: Minor
                    Found in RaffleDAO.php - About 1 hr to fix

                      Method setClient has 32 lines of code (exceeds 25 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 1 hr to fix

                        Method getAuthenticationWebView has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function getAuthenticationWebView($authUrl,$debugData = null){
                            ob_start();
                            ?><!doctype html>
                            <html>
                            <head>
                        Severity: Minor
                        Found in Admin.php - About 1 hr to fix

                          Function authenticate has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public function authenticate(
                                  $client = null, 
                                  $code = null, 
                                  $token = null
                              ){
                          Severity: Minor
                          Found in AdminDAO.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 createTables has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public function createTables(
                                  $client = null,
                                  $tableSchema = null,
                                  $debug = null
                              ){
                          Severity: Minor
                          Found in AdminDAO.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