mariuz/firebirdwebadmin

View on GitHub

Showing 162 of 204 total issues

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

function modify_domain($olddef, $domdef)
{
    global $dbhandle, $fb_error;

    $lsql = array();
Severity: Minor
Found in inc/domains.inc.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 print_rows_nosp has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

function print_rows_nosp($wt)
{
    global $dbhandle;

    $types = get_column_types($wt['table'], $wt['columns']);
Severity: Minor
Found in inc/handle_watchtable.inc.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 watchtable_column_options has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

function watchtable_column_options($table, $show_cols, $sort_col, $bloblinks, $blobas)
{
    global $sql_strings;

    echo "<table class=\"table table-hover table-bordered\">\n";
Severity: Minor
Found in inc/handle_watchtable.inc.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 watchtable_column_options has 43 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function watchtable_column_options($table, $show_cols, $sort_col, $bloblinks, $blobas)
{
    global $sql_strings;

    echo "<table class=\"table table-hover table-bordered\">\n";
Severity: Minor
Found in inc/handle_watchtable.inc.php - About 1 hr to fix

    Method js_data_export has 42 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function js_data_export()
    {
        $server_url = xml_http_request_server_url();
    
        $js = <<<EOT
    Severity: Minor
    Found in inc/javascript.inc.php - About 1 hr to fix

      Method set_customize_cookie has 42 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function set_customize_cookie($customize)
      {
      
          // don't save rubbish if the session is gone
          if (empty($customize['color'])) {
      Severity: Minor
      Found in inc/functions.inc.php - About 1 hr to fix

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

        function get_procedure_parameters($name)
        {
            global $dbhandle, $s_charsets;
        
            $sql = 'SELECT P.RDB$PARAMETER_NAME PNAME,'
        Severity: Minor
        Found in inc/procedures.inc.php - About 1 hr to fix

          Function XMLHttpRequestClient has 40 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function XMLHttpRequestClient(server_url) {
          
              var method = 'GET';
              var serverUrl = server_url;
              var response  = null;
          Severity: Minor
          Found in js/XMLHttpRequestClient.js - About 1 hr to fix

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

            function export_data($export)
            {
                global $s_fields, $warning;
            
                ini_set('ibase.dateformat', $export['general']['date']);
            Severity: Minor
            Found in inc/export.inc.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 get_column_constraint_definition has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
            Open

            function get_column_constraint_definition($coldefs, $idx)
            {
                global $fk_actions, $tb_strings;
            
                $fk_name = isset($coldefs['fk_name'])   ? $coldefs['fk_name']   : '';
            Severity: Minor
            Found in inc/panel_elements.inc.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 display_table has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
            Open

            function display_table($wt)
            {
                global $dbhandle, $sql_strings, $button_strings, $s_watch_buffer, $s_cust;
            
                if ($wt['table'] == '' || !is_array($wt['columns'])) {
            Severity: Minor
            Found in inc/handle_watchtable.inc.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 is_allowed_db has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
            Open

            function is_allowed_db($filename)
            {
                global $ALLOWED_FILES, $ALLOWED_DIRS;
            
                $cmp_func = (stristr(php_uname(), 'wind') !== false) ? 'strcasecmp' : 'strcmp';
            Severity: Minor
            Found in inc/functions.inc.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 get_trigger_definition has 39 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function get_trigger_definition($title)
            {
                global $s_triggerdefs, $acc_strings, $s_cust;
            
                $trigger_source = htmlspecialchars($s_triggerdefs['source']);
            Severity: Minor
            Found in inc/triggers.inc.php - About 1 hr to fix

              Method build_datatype has 39 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function build_datatype($defs, $type = 'column', $mode = 'create')
              {
              
                  $datatype = $defs['type'];
                  $sql = '';
              Severity: Minor
              Found in inc/functions.inc.php - About 1 hr to fix

                Method detail_view has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function detail_view($type, $name, $title)
                {
                    $url = fold_detail_url($type, 'open', $name, $title);
                    $comment_url = "javascript:requestCommentArea('".$type."', '".$name."');";
                    $comment_div = detail_div_prefix($type).'c_'.$name;
                Severity: Minor
                Found in inc/xml_http_request_server.php - About 1 hr to fix

                  Method js_collations has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function js_collations($charsets)
                  {
                      static $done = false;
                  
                      if ($done == true) {
                  Severity: Minor
                  Found in inc/javascript.inc.php - About 1 hr to fix

                    Method user_definition has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function user_definition($udata, $title, $modify = false)
                    {
                        global $usr_strings;
                    
                        $readonly_str = $modify ? 'readonly="readonly"' : '';
                    Severity: Minor
                    Found in inc/users.inc.php - About 1 hr to fix

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

                      function get_opened_trigger($name, $trigger, $url)
                      {
                          global $dbhandle, $acc_strings, $ptitle_strings;
                      
                          $type_str = implode('<br>', $trigger['type']);
                      Severity: Minor
                      Found in inc/triggers.inc.php - About 1 hr to fix

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

                        function print_rows_nosp($wt)
                        {
                            global $dbhandle;
                        
                            $types = get_column_types($wt['table'], $wt['columns']);
                        Severity: Minor
                        Found in inc/handle_watchtable.inc.php - About 1 hr to fix

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

                          function js_checkColConstraint()
                          {
                              static $done = false;
                          
                              if ($done == true) {
                          Severity: Minor
                          Found in inc/javascript.inc.php - About 1 hr to fix
                            Severity
                            Category
                            Status
                            Source
                            Language