File handle_watchtable.inc.php
has 488 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
// File inc/handle_watchtable.inc.php / FirebirdWebAdmin
// Purpose provides the watch table handling for sql.php and data.php
// Author Lutz Brueckner <irie@gmx.de>
// Copyright (c) 2000-2006 by Lutz Brueckner,
Method display_table
has 65 lines of code (exceeds 25 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'])) {
Function print_value
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
function print_value($wt, $val, $type, $colname = null, $obj = null)
{
if ($val === null) {
$data = '<i>NULL</i>';
$align = 'center';
- Read upRead up
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 print_value
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
function print_value($wt, $val, $type, $colname = null, $obj = null)
{
if ($val === null) {
$data = '<i>NULL</i>';
$align = 'center';
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']);
- Read upRead up
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";
- Read upRead up
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";
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'])) {
- Read upRead up
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 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']);
Function print_rows_sp
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function print_rows_sp($wt)
{
global $dbhandle, $fb_error;
$types = get_column_types($wt['table'], $wt['columns']);
- Read upRead up
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 print_rows_sp
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function print_rows_sp($wt)
{
global $dbhandle, $fb_error;
$types = get_column_types($wt['table'], $wt['columns']);
Method watchtable_column_options
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function watchtable_column_options($table, $show_cols, $sort_col, $bloblinks, $blobas)
Method print_value
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function print_value($wt, $val, $type, $colname = null, $obj = null)
Function get_where_str
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function get_where_str($obj)
{
static $quote;
if (!isset($quote)) {
$quote = identifier_quote($GLOBALS['s_login']['dialect']);
- Read upRead up
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"