mariuz/firebirdwebadmin

View on GitHub

Showing 162 of 204 total issues

Function initialize_session has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

function initialize_session()
{
    global $ptitle_strings, $adm_strings;

    $session_vars =
Severity: Minor
Found in inc/session.inc.php - About 45 mins 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_textfield has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

function get_textfield($name, $size, $maxlength = null, $value = null, $type = 'text', $tags = array())
Severity: Minor
Found in inc/panel_elements.inc.php - About 45 mins to fix

    Function init_edit_values has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
    Open

    function init_edit_values($edit_where, $fields)
    {
        $values = array();
    
        $quote = identifier_quote($GLOBALS['s_login']['dialect']);
    Severity: Minor
    Found in watchtable.php - About 45 mins 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_table_selectlist has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    function get_table_selectlist($name, $restrictions = array(), $sel = null, $empty = false, $tags = array(), $size = 1)
    Severity: Minor
    Found in inc/panel_elements.inc.php - About 45 mins to fix

      Function set_customize_settings has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

      function set_customize_settings($cookie_string)
      {
      
          $settings = explode("\n", $cookie_string);
      
      
      Severity: Minor
      Found in inc/functions.inc.php - About 45 mins 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_selectlist has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      function get_selectlist($name, $arr, $sel = null, $empty = false, $tags = array(), $size = 1)
      Severity: Minor
      Found in inc/panel_elements.inc.php - About 45 mins to fix

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

        function get_indexed_selectlist($name, $arr, $sel = null, $empty = false, $tags = array(), $size = 1)
        Severity: Minor
        Found in inc/panel_elements.inc.php - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                              while ($row = fbird_fetch_object($res)) {
                                  $results[$lnr][] = get_object_vars($row);
                                  ++$cnt;
                                  if ($cnt >= SHOW_OUTPUT_ROWS
                                  &&  !isset($_POST['sql_display_all'])) {
          Severity: Major
          Found in sql.php - About 45 mins to fix

            Function get_type_string has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
            Open

            function get_type_string($field)
            {
            
                if (in_array($field['type'], array_keys($GLOBALS['s_domains']))) {
                    $field = $GLOBALS['s_domains'][$field['type']];
            Severity: Minor
            Found in inc/functions.inc.php - About 45 mins 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 export_table_query has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
            Open

            function export_table_query($table, $export)
            {
                global $warning;
            
                $columns = array();
            Severity: Minor
            Found in inc/export.inc.php - About 45 mins 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 column_fk_is_modified has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
            Open

            function column_fk_is_modified($olddef, $coldef)
            {
            
                $varnames = array('fk_name', 'on_update', 'on_delete', 'fk_table', 'fk_column');
                foreach ($varnames as $name) {
            Severity: Minor
            Found in inc/functions.inc.php - About 45 mins 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 datatype_is_modified has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
            Open

            function datatype_is_modified($olddef, $coldef)
            {
            
                $varnames = array('type', 'size', 'charset', 'prec', 'scale', 'stype', 'segsize');
            
            
            Severity: Minor
            Found in inc/functions.inc.php - About 45 mins 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

            Consider simplifying this complex logical expression.
            Open

                    if ((isset($olddef[$name]) && $olddef[$name] != $coldef[$name])
                        || (!isset($coldef[$name]) && !empty($olddef[$name]))
                        || (!isset($olddef[$name]) && !empty($coldef[$name]))
                    ) {
            
            
            Severity: Major
            Found in inc/functions.inc.php - About 40 mins to fix

              Consider simplifying this complex logical expression.
              Open

                      if ((isset($olddef[$name]) && $olddef[$name] != $coldef[$name])
                          || (!isset($coldef[$name]) && !empty($olddef[$name]))
                          || (!isset($olddef[$name]) && !empty($coldef[$name]))
                      ) {
              
              
              Severity: Major
              Found in inc/functions.inc.php - About 40 mins to fix

                Consider simplifying this complex logical expression.
                Open

                    if ($indices[$iname]['table'] != $_POST['def_index_table']
                    ||  $iname != $_POST['def_index_name']
                    ||  $indices[$iname]['dir']   != $_POST['def_index_dir']
                    ||  $indices[$iname]['uniq']  != $uniq_flag
                    ||  $indices[$iname]['active'] != $acti_flag
                Severity: Major
                Found in inc/indices.inc.php - About 40 mins to fix

                  Consider simplifying this complex logical expression.
                  Open

                          if ($idx == 0  &&  $value === ''  &&
                              in_array($type, array('INTEGER', 'BIGINT', 'SMALLINT'))  &&
                              isset($field['notnull'])  &&  $field['notnull'] == 'Yes'  &&
                              have_active_trigger($s_triggers, $s_enter_name, 'before', 'insert')) {
                              ++$idx;
                  Severity: Major
                  Found in data.php - About 40 mins to fix

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

                        public function __construct($table, $fields, $values, $prefix, $postfix = '')
                    Severity: Minor
                    Found in inc/DataForm.php - About 35 mins to fix

                      Method isql_execute has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      function isql_execute($sql, $user = null, $pw = null, $db = null, $host = null)
                      Severity: Minor
                      Found in inc/functions.inc.php - About 35 mins to fix

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

                            public function __construct($table, $fields, $values, $condition, $instance)
                        Severity: Minor
                        Found in inc/DataForm.php - About 35 mins to fix

                          Method error_handler has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                          function error_handler($errno, $errmsg, $file, $line, $errstack)
                          Severity: Minor
                          Found in inc/functions.inc.php - About 35 mins to fix
                            Severity
                            Category
                            Status
                            Source
                            Language