mariuz/firebirdwebadmin

View on GitHub
inc/system_table.inc.php

Summary

Maintainability
C
1 day
Test Coverage

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

function get_systable_html($table, $s_systable)
{
    $html = "<table id=\"systable\" class=\"table table-bordered table-hover tsep\" cellpadding=\"2\">\n<thead><tr>\n";
    foreach (array_keys($table) as $colname) {
        if ($s_systable['order'] == $colname) {
Severity: Minor
Found in inc/system_table.inc.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

Function get_systable has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

function get_systable($s_systable)
{
    global $dbhandle;

    // get the field names and types
Severity: Minor
Found in inc/system_table.inc.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 get_systable has 58 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function get_systable($s_systable)
{
    global $dbhandle;

    // get the field names and types
Severity: Major
Found in inc/system_table.inc.php - About 2 hrs to fix

    Method get_systable_html has 52 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function get_systable_html($table, $s_systable)
    {
        $html = "<table id=\"systable\" class=\"table table-bordered table-hover tsep\" cellpadding=\"2\">\n<thead><tr>\n";
        foreach (array_keys($table) as $colname) {
            if ($s_systable['order'] == $colname) {
    Severity: Major
    Found in inc/system_table.inc.php - About 2 hrs to fix

      Method systable_textblobs has 48 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function systable_textblobs()
      {
          return
              array('RDB$CHARACTER_SETS' => array('columns' => array('RDB$DESCRIPTON'),
                                                        'indices' => array('RDB$RDB$CHARACTER_SET_NAME'),
      Severity: Minor
      Found in inc/system_table.inc.php - About 1 hr to fix

        There are no issues that match your filters.

        Category
        Status