admin/update.php
Method update_tables_to_300
has 166 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function update_tables_to_300()
{
$dbupdater = new Wfdownloads\Dbupdater();
if (!wfdownloads_TableExists('wfdownloads_meta')) {
File update.php
has 281 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
*
* Module: SmartSection
Method invert_nohtm_dohtml_values
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function invert_nohtm_dohtml_values()
{
$ret = [];
global $xoopsDB;
$helperWfdownloads = \Xmf\Module\Helper::getHelper('wfdownloads');
Function update_tables_to_300
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
function update_tables_to_300()
{
$dbupdater = new Wfdownloads\Dbupdater();
if (!wfdownloads_TableExists('wfdownloads_meta')) {
- 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 get_table_info
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
function get_table_info($table, $default_fields)
{
global $xoopsDB;
$result = $xoopsDB->query('SHOW COLUMNS FROM ' . $table);
while (false !== ($existing_field = $xoopsDB->fetchArray($result))) {
- 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"