Showing 307 of 307 total issues
Avoid too many return
statements within this method. Open
case 'REFERENTIAL_CONSTRAINTS': return array(array('source' => array('CONSTRAINT_CATALOG', 'CONSTRAINT_SCHEMA')) + $schemata, array('source' => array('UNIQUE_CONSTRAINT_CATALOG', 'UNIQUE_CONSTRAINT_SCHEMA')) + $schemata, array(
'source' => array(
'CONSTRAINT_CATALOG',
'CONSTRAINT_SCHEMA',
'TABLE_NAME'
Avoid too many return
statements within this method. Open
case 'STATISTICS': return array($schemata, $tables, $columns, array('source' => array('TABLE_CATALOG', 'INDEX_SCHEMA')) + $schemata);
Avoid too many return
statements within this method. Open
case 'TABLE_CONSTRAINTS': return array(array('source' => array('CONSTRAINT_CATALOG', 'CONSTRAINT_SCHEMA')) + $schemata, array('source' => array('CONSTRAINT_CATALOG', 'TABLE_SCHEMA')) + $schemata, array('source' => array('CONSTRAINT_CATALOG', 'TABLE_SCHEMA', 'TABLE_NAME')) + $tables);
Avoid too many return
statements within this method. Open
case 'TRIGGERS': return array_merge(array(array('source' => array('TRIGGER_CATALOG', 'TRIGGER_SCHEMA')) + $schemata, array('source' => array('EVENT_OBJECT_CATALOG', 'EVENT_OBJECT_SCHEMA')) + $schemata, array(
'source' => array(
'EVENT_OBJECT_CATALOG',
'EVENT_OBJECT_SCHEMA',
'EVENT_OBJECT_TABLE'
Avoid too many return
statements within this method. Open
null;if($o=="orig")return($l["on_update"]=="CURRENT_TIMESTAMP"?idf_escape($l["field"]):false);if($o=="NULL")return"NULL";if($l["type"]=="set")return
array_sum((array)$W);if($o=="json"){$o="";$W=json_decode($W,true);if(!is_array($W))return
Avoid too many return
statements within this method. Open
case 'time_zone_transition_type': return array(array('table' => 'time_zone', 'source' => array('Time_zone_id'), 'target' => array('Time_zone_id')));
Avoid too many return
statements within this method. Open
case 'time_zone_transition': return array(array('table' => 'time_zone', 'source' => array('Time_zone_id'), 'target' => array('Time_zone_id')), array(
'table' => 'time_zone_transition_type', 'source' => array('Time_zone_id', 'Transition_type_id'), 'target' => array(
'Time_zone_id',
'Transition_type_id'
)));
Avoid too many return
statements within this method. Open
case 'VIEWS': return array($schemata);
Avoid too many return
statements within this method. Open
null;if($q=="orig")return($l["on_update"]=="CURRENT_TIMESTAMP"?idf_escape($l["field"]):false);if($q=="NULL")return"NULL";if($l["type"]=="set")return
Avoid too many return
statements within this method. Open
false;return$Y;}if(preg_match('~blob|bytea|raw|file~',$l["type"])&&ini_bool("file_uploads")){$mc=get_file("fields-$Jc");if(!is_string($mc))return
Avoid too many return
statements within this method. Open
false;return
q($mc);}return$b->processInput($l,$Y,$q);}function
Avoid too many return
statements within this method. Open
null;if($q=="orig")return($l["on_update"]=="CURRENT_TIMESTAMP"?idf_escape($l["field"]):false);if($q=="NULL")return"NULL";if($l["type"]=="set")return
array_sum((array)$Y);if($q=="json"){$q="";$Y=json_decode($Y,true);if(!is_array($Y))return
Avoid too many return
statements within this method. Open
null;if($q=="orig")return($l["on_update"]=="CURRENT_TIMESTAMP"?idf_escape($l["field"]):false);if($q=="NULL")return"NULL";if($l["type"]=="set")return
Avoid too many return
statements within this method. Open
false;return$Y;}if(preg_match('~blob|bytea|raw|file~',$l["type"])&&ini_bool("file_uploads")){$mc=get_file("fields-$Jc");if(!is_string($mc))return
false;return
Avoid too many return
statements within this method. Open
q($mc);}return$b->processInput($l,$Y,$q);}function
Avoid too many return
statements within this method. Open
array_sum((array)$Y);if($q=="json"){$q="";$Y=json_decode($Y,true);if(!is_array($Y))return
false;return$Y;}if(preg_match('~blob|bytea|raw|file~',$l["type"])&&ini_bool("file_uploads")){$mc=get_file("fields-$Jc");if(!is_string($mc))return
Function _foreignKeyOptions
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
array($Lb["table"],$r,$D);}}}}function
_foreignKeyOptions($R,$d,$W=null){global$f;if(list($fe,$r,$D)=$this->_foreignColumn(column_foreign_keys($R),$d)){$K=&$this->_values[$fe];if($K===null){$S=table_status($fe);$K=($S["Rows"]>1000?"":array(""=>"")+get_key_vals("SELECT $r, $D FROM ".table($fe)." ORDER BY 2"));}if(!$K&&$W!==null)return$f->result("SELECT $D FROM ".table($fe)." WHERE $r = ".q($W));return$K;}}}$b=(function_exists('adminer_object')?adminer_object():new
- 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 processInput
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function processInput($field, $value, $function = '') {
if (preg_match('~(.*)_path$~', $field['field'], $regs)) {
$table = ($_GET['edit'] != '' ? $_GET['edit'] : $_GET['select']);
$name = "fields-$field[field]";
if ($_FILES[$name]['error'] || !preg_match("~(\\.($this->extensions))?\$~", $_FILES[$name]['name'], $regs2)) {
- 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 _foreignColumn
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
as$L){$D=$this->tableName($L);if(isset($L["Engine"])&&$D!="")echo"<a href='".h(ME).'select='.urlencode($L["Name"])."'".bold($_GET["select"]==$L["Name"]||$_GET["edit"]==$L["Name"],"select")." title='".'Select data'."'>$D</a><br>\n";}}function
_foreignColumn($Mb,$d){foreach((array)$Mb[$d]as$Lb){if(count($Lb["source"])==1){$D=$this->rowDescription($Lb["table"]);if($D!=""){$r=idf_escape($Lb["target"][0]);return
array($Lb["table"],$r,$D);}}}}function
- 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 dumpData
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
dumpTable(){echo"\xef\xbb\xbf";}function
dumpData($R,$Xd,$I){global$f;$J=$f->query($I,1);if($J){while($L=$J->fetch_assoc()){if($Xd=="table"){dump_csv(array_keys($L));$Xd="INSERT";}dump_csv($L);}}}function
- 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"