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 =
- 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 get_textfield
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function get_textfield($name, $size, $maxlength = null, $value = null, $type = 'text', $tags = array())
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']);
- 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 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)
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);
- 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 get_selectlist
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function get_selectlist($name, $arr, $sel = null, $empty = false, $tags = array(), $size = 1)
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)
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'])) {
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']];
- 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 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();
- 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 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) {
- 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 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');
- 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
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]))
) {
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]))
) {
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
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;
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct($table, $fields, $values, $prefix, $postfix = '')
Method isql_execute
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function isql_execute($sql, $user = null, $pw = null, $db = null, $host = null)
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct($table, $fields, $values, $condition, $instance)
Method error_handler
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function error_handler($errno, $errmsg, $file, $line, $errstack)