ImpressCMS/impresscms

View on GitHub
htdocs/modules/system/include/update.php

Summary

Maintainability
D
1 day
Test Coverage

Function xoops_module_update_system has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring.
Open

function xoops_module_update_system(&$module, $oldversion = null, $dbVersion = null) {
    global $xoTheme;

    $from_112 = $abortUpdate = false;

Severity: Minor
Found in htdocs/modules/system/include/update.php - About 1 day 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 xoops_module_update_system has 141 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function xoops_module_update_system(&$module, $oldversion = null, $dbVersion = null) {
    global $xoTheme;

    $from_112 = $abortUpdate = false;

Severity: Major
Found in htdocs/modules/system/include/update.php - About 5 hrs to fix

    The function xoops_module_update_system() has an NPath complexity of 15633216. The configured NPath complexity threshold is 200.
    Open

    function xoops_module_update_system(&$module, $oldversion = null, $dbVersion = null) {
        global $xoTheme;
    
        $from_112 = $abortUpdate = false;
    
    

    NPathComplexity

    Since: 0.1

    The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

    Example

    class Foo {
        function bar() {
            // lots of complicated code
        }
    }

    Source https://phpmd.org/rules/codesize.html#npathcomplexity

    The function xoops_module_update_system() has 217 lines of code. Current threshold is set to 100. Avoid really long methods.
    Open

    function xoops_module_update_system(&$module, $oldversion = null, $dbVersion = null) {
        global $xoTheme;
    
        $from_112 = $abortUpdate = false;
    
    

    The function xoops_module_update_system() has a Cyclomatic Complexity of 33. The configured cyclomatic complexity threshold is 10.
    Open

    function xoops_module_update_system(&$module, $oldversion = null, $dbVersion = null) {
        global $xoTheme;
    
        $from_112 = $abortUpdate = false;
    
    

    CyclomaticComplexity

    Since: 0.1

    Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

    Example

    // Cyclomatic Complexity = 11
    class Foo {
    1   public function example() {
    2       if ($a == $b) {
    3           if ($a1 == $b1) {
                    fiddle();
    4           } elseif ($a2 == $b2) {
                    fiddle();
                } else {
                    fiddle();
                }
    5       } elseif ($c == $d) {
    6           while ($c == $d) {
                    fiddle();
                }
    7        } elseif ($e == $f) {
    8           for ($n = 0; $n < $h; $n++) {
                    fiddle();
                }
            } else {
                switch ($z) {
    9               case 1:
                        fiddle();
                        break;
    10              case 2:
                        fiddle();
                        break;
    11              case 3:
                        fiddle();
                        break;
                    default:
                        fiddle();
                        break;
                }
            }
        }
    }

    Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity

    Missing class import via use statement (line '147', column '23').
    Open

                $criteria->add(new icms_db_criteria_Item('conf_value', 'tinymce'));

    MissingImport

    Since: 2.7.0

    Importing all external classes in a file through use statements makes them clearly visible.

    Example

    function make() {
        return new \stdClass();
    }

    Source http://phpmd.org/rules/cleancode.html#MissingImport

    Missing class import via use statement (line '191', column '22').
    Open

                        $tableObj = new icms_db_legacy_updater_Table($table);

    MissingImport

    Since: 2.7.0

    Importing all external classes in a file through use statements makes them clearly visible.

    Example

    function make() {
        return new \stdClass();
    }

    Source http://phpmd.org/rules/cleancode.html#MissingImport

    Missing class import via use statement (line '67', column '56').
    Open

                $duplicate_files = $tplfile_handler->getObjects(new icms_db_criteria_Item('tpl_id', "(" . implode(',', $tplids) . ")", "IN"));

    MissingImport

    Since: 2.7.0

    Importing all external classes in a file through use statements makes them clearly visible.

    Example

    function make() {
        return new \stdClass();
    }

    Source http://phpmd.org/rules/cleancode.html#MissingImport

    Missing class import via use statement (line '137', column '23').
    Open

                $criteria->add(new icms_db_criteria_Item('conf_value', 'FCKeditor'));

    MissingImport

    Since: 2.7.0

    Importing all external classes in a file through use statements makes them clearly visible.

    Example

    function make() {
        return new \stdClass();
    }

    Source http://phpmd.org/rules/cleancode.html#MissingImport

    Missing class import via use statement (line '200', column '21').
    Open

                    $criteria = new icms_db_criteria_Compo();

    MissingImport

    Since: 2.7.0

    Importing all external classes in a file through use statements makes them clearly visible.

    Example

    function make() {
        return new \stdClass();
    }

    Source http://phpmd.org/rules/cleancode.html#MissingImport

    Missing class import via use statement (line '146', column '20').
    Open

                $criteria = new icms_db_criteria_Compo();

    MissingImport

    Since: 2.7.0

    Importing all external classes in a file through use statements makes them clearly visible.

    Example

    function make() {
        return new \stdClass();
    }

    Source http://phpmd.org/rules/cleancode.html#MissingImport

    Missing class import via use statement (line '201', column '24').
    Open

                    $criteria->add(new icms_db_criteria_Item('conf_name', $item));

    MissingImport

    Since: 2.7.0

    Importing all external classes in a file through use statements makes them clearly visible.

    Example

    function make() {
        return new \stdClass();
    }

    Source http://phpmd.org/rules/cleancode.html#MissingImport

    Missing class import via use statement (line '211', column '17').
    Open

                $table = new icms_db_legacy_updater_Table($tabletoupdate);

    MissingImport

    Since: 2.7.0

    Importing all external classes in a file through use statements makes them clearly visible.

    Example

    function make() {
        return new \stdClass();
    }

    Source http://phpmd.org/rules/cleancode.html#MissingImport

    Missing class import via use statement (line '136', column '20').
    Open

                $criteria = new icms_db_criteria_Compo();

    MissingImport

    Since: 2.7.0

    Importing all external classes in a file through use statements makes them clearly visible.

    Example

    function make() {
        return new \stdClass();
    }

    Source http://phpmd.org/rules/cleancode.html#MissingImport

    Avoid using static access to class 'icms_core_Filesystem' in method 'xoops_module_update_system'.
    Open

                        icms_core_Filesystem::deleteRecursive($foldertoremove, true);

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    Avoid using static access to class 'icms_core_Filesystem' in method 'xoops_module_update_system'.
    Open

                    icms_core_Filesystem::deleteRecursive(ICMS_EDITOR_PATH . '/FCKeditor', true);

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    Avoid using static access to class 'icms_core_Filesystem' in method 'xoops_module_update_system'.
    Open

                    echo icms_core_Filesystem::deleteRecursive($foldertoremove, true). '</br>';

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    Avoid using static access to class 'icms_core_Message' in method 'xoops_module_update_system'.
    Open

            icms_core_Message::error(sprintf(_DATABASEUPDATER_UPDATE_ERR, icms_conv_nr2local($newDbVersion)), _DATABASEUPDATER_UPDATE_DB, TRUE);

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    Avoid using static access to class 'icms' in method 'xoops_module_update_system'.
    Open

                $tplfile_handler = icms::handler('icms_view_template_file');

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    Avoid using static access to class 'icms_core_Filesystem' in method 'xoops_module_update_system'.
    Open

                    icms_core_Filesystem::deleteFile($filetoremove);

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    Avoid using static access to class 'icms_core_Filesystem' in method 'xoops_module_update_system'.
    Open

        return icms_core_Filesystem::cleanFolders(array (
            'templates_c' => ICMS_COMPILE_PATH . "/",
            'cache' => ICMS_CACHE_PATH . "/"
        ), $CleanWritingFolders);

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    Avoid using static access to class 'icms_db_legacy_Factory' in method 'xoops_module_update_system'.
    Open

        $icmsDatabaseUpdater = icms_db_legacy_Factory::getDatabaseUpdater();

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    The method xoops_module_update_system uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
    Open

        } else {
            echo $feedback;
        }

    ElseExpression

    Since: 1.4.0

    An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

    Example

    class Foo
    {
        public function bar($flag)
        {
            if ($flag) {
                // one branch
            } else {
                // another branch
            }
        }
    }

    Source https://phpmd.org/rules/cleancode.html#elseexpression

    Avoid using static access to class 'icms_core_Filesystem' in method 'xoops_module_update_system'.
    Open

                        icms_core_Filesystem::deleteFile($filetoremove);

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    Avoid using static access to class 'icms_core_Filesystem' in method 'xoops_module_update_system'.
    Open

                    icms_core_Filesystem::deleteRecursive(ICMS_EDITOR_PATH . '/tinymce', true);

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    Avoid using static access to class 'icms' in method 'xoops_module_update_system'.
    Open

                $module_handler = icms::handler('icms_module');

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    Avoid unused local variables such as '$xoTheme'.
    Open

        global $xoTheme;

    UnusedLocalVariable

    Since: 0.2

    Detects when a local variable is declared and/or assigned, but not used.

    Example

    class Foo {
        public function doSomething()
        {
            $i = 5; // Unused
        }
    }

    Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

    TODO found
    Open

                // TODO: make a generic file removal function.

    Call to method handler from undeclared class \icms
    Open

                $tplfile_handler = icms::handler('icms_view_template_file');
    Severity: Critical
    Found in htdocs/modules/system/include/update.php by phan

    Call to method dropFields from undeclared class \icms_db_legacy_updater_Table
    Open

                    $table->dropFields();
    Severity: Critical
    Found in htdocs/modules/system/include/update.php by phan

    Reference to static property config from undeclared class \icms
    Open

                        icms::$config->deleteConfig($config[0]);
    Severity: Critical
    Found in htdocs/modules/system/include/update.php by phan

    Reference to undeclared constant \_DATABASEUPDATER_UPDATE_DB
    Open

            icms_core_Message::error(sprintf(_DATABASEUPDATER_UPDATE_ERR, icms_conv_nr2local($newDbVersion)), _DATABASEUPDATER_UPDATE_DB, TRUE);

    Call to method add from undeclared class \icms_db_criteria_Compo
    Open

                $criteria->add(new icms_db_criteria_Item('conf_value', 'FCKeditor'));
    Severity: Critical
    Found in htdocs/modules/system/include/update.php by phan

    Call to method add from undeclared class \icms_db_criteria_Compo
    Open

                $criteria->add(new icms_db_criteria_Item('conf_value', 'tinymce'));
    Severity: Critical
    Found in htdocs/modules/system/include/update.php by phan

    Call to method __construct from undeclared class \icms_db_legacy_updater_Table
    Open

                        $tableObj = new icms_db_legacy_updater_Table($table);
    Severity: Critical
    Found in htdocs/modules/system/include/update.php by phan

    Reference to undeclared constant \_DATABASEUPDATER_MSG_FROM_112
    Open

            echo _DATABASEUPDATER_MSG_FROM_112;

    Call to method __construct from undeclared class \icms_db_criteria_Compo
    Open

                    $criteria = new icms_db_criteria_Compo();
    Severity: Critical
    Found in htdocs/modules/system/include/update.php by phan

    Argument 1 (string) is ?47|?48 but \icms_conv_nr2local() takes int defined at /code/htdocs/include/functions.php:1231
    Open

            icms_core_Message::error(sprintf(_DATABASEUPDATER_UPDATE_ERR, icms_conv_nr2local($newDbVersion)), _DATABASEUPDATER_UPDATE_DB, TRUE);

    Reference to static property xoopsDB from undeclared class \icms
    Open

            while (list($tplid) = icms::$xoopsDB->fetchRow($result)) {
    Severity: Critical
    Found in htdocs/modules/system/include/update.php by phan

    Call to method __construct from undeclared class \icms_db_criteria_Compo
    Open

                $criteria = new icms_db_criteria_Compo();
    Severity: Critical
    Found in htdocs/modules/system/include/update.php by phan

    Call to method deleteRecursive from undeclared class \icms_core_Filesystem
    Open

                    echo icms_core_Filesystem::deleteRecursive($foldertoremove, true). '</br>';
    Severity: Critical
    Found in htdocs/modules/system/include/update.php by phan

    Reference to undeclared constant \_DATABASEUPDATER_UPDATE_ERR
    Open

            icms_core_Message::error(sprintf(_DATABASEUPDATER_UPDATE_ERR, icms_conv_nr2local($newDbVersion)), _DATABASEUPDATER_UPDATE_DB, TRUE);

    Reference to undeclared constant \_DATABASEUPDATER_CURRENTVER
    Open

        echo sprintf(_DATABASEUPDATER_CURRENTVER, icms_conv_nr2local($dbVersion)) . '<br />';

    Call to method deleteRecursive from undeclared class \icms_core_Filesystem
    Open

                    icms_core_Filesystem::deleteRecursive(ICMS_EDITOR_PATH . '/tinymce', true);
    Severity: Critical
    Found in htdocs/modules/system/include/update.php by phan

    Reference to static property config from undeclared class \icms
    Open

                $config = icms::$config->getConfigs($criteria);
    Severity: Critical
    Found in htdocs/modules/system/include/update.php by phan

    Call to method add from undeclared class \icms_db_criteria_Compo
    Open

                    $criteria->add(new icms_db_criteria_Item('conf_name', $item));
    Severity: Critical
    Found in htdocs/modules/system/include/update.php by phan

    Call to method __construct from undeclared class \icms_db_criteria_Item
    Open

                $duplicate_files = $tplfile_handler->getObjects(new icms_db_criteria_Item('tpl_id', "(" . implode(',', $tplids) . ")", "IN"));
    Severity: Critical
    Found in htdocs/modules/system/include/update.php by phan

    Call to method getDatabaseUpdater from undeclared class \icms_db_legacy_Factory
    Open

        $icmsDatabaseUpdater = icms_db_legacy_Factory::getDatabaseUpdater();
    Severity: Critical
    Found in htdocs/modules/system/include/update.php by phan

    Call to method deleteRecursive from undeclared class \icms_core_Filesystem
    Open

                    icms_core_Filesystem::deleteRecursive(ICMS_EDITOR_PATH . '/FCKeditor', true);
    Severity: Critical
    Found in htdocs/modules/system/include/update.php by phan

    Call to method cleanFolders from undeclared class \icms_core_Filesystem
    Open

        return icms_core_Filesystem::cleanFolders(array (
    Severity: Critical
    Found in htdocs/modules/system/include/update.php by phan

    Call to method handler from undeclared class \icms
    Open

                $module_handler = icms::handler('icms_module');
    Severity: Critical
    Found in htdocs/modules/system/include/update.php by phan

    Reference to static property xoopsDB from undeclared class \icms
    Open

            $result = icms::$xoopsDB->query("SELECT t1.tpl_id FROM " . icms::$xoopsDB->prefix('tplfile') . " t1, " . icms::$xoopsDB->prefix('tplfile') . " t2 WHERE t1.tpl_module = t2.tpl_module AND t1.tpl_tplset=t2.tpl_tplset AND t1.tpl_file = t2.tpl_file AND t1.tpl_id > t2.tpl_id");
    Severity: Critical
    Found in htdocs/modules/system/include/update.php by phan

    Call to method __construct from undeclared class \icms_db_criteria_Compo
    Open

                $criteria = new icms_db_criteria_Compo();
    Severity: Critical
    Found in htdocs/modules/system/include/update.php by phan

    Call to method __construct from undeclared class \icms_db_criteria_Item
    Open

                $criteria->add(new icms_db_criteria_Item('conf_value', 'FCKeditor'));
    Severity: Critical
    Found in htdocs/modules/system/include/update.php by phan

    Call to method exists from undeclared class \icms_db_legacy_updater_Table
    Open

                        if ($tableObj->exists()) {
    Severity: Critical
    Found in htdocs/modules/system/include/update.php by phan

    Call to method __construct from undeclared class \icms_db_criteria_Item
    Open

                $criteria->add(new icms_db_criteria_Item('conf_value', 'tinymce'));
    Severity: Critical
    Found in htdocs/modules/system/include/update.php by phan

    Call to method __construct from undeclared class \icms_db_criteria_Item
    Open

                    $criteria->add(new icms_db_criteria_Item('conf_name', $item));
    Severity: Critical
    Found in htdocs/modules/system/include/update.php by phan

    Reference to static property config from undeclared class \icms
    Open

                    $config = icms::$config->getConfigs($criteria);
    Severity: Critical
    Found in htdocs/modules/system/include/update.php by phan

    Call to method deleteFile from undeclared class \icms_core_Filesystem
    Open

                    icms_core_Filesystem::deleteFile($filetoremove);
    Severity: Critical
    Found in htdocs/modules/system/include/update.php by phan

    Argument 1 (string) is ?47|?48 but \icms_conv_nr2local() takes int defined at /code/htdocs/include/functions.php:1231
    Open

                    echo sprintf(_DATABASEUPDATER_UPDATE_OK, icms_conv_nr2local($newDbVersion)) . '<br />';

    Reference to undeclared constant \_DATABASEUPDATER_UPDATE_TO
    Open

        echo "<code>" . sprintf(_DATABASEUPDATER_UPDATE_TO, icms_conv_nr2local(ICMS_SYSTEM_DBVERSION)) . "<br />";

    Call to method deleteRecursive from undeclared class \icms_core_Filesystem
    Open

                        icms_core_Filesystem::deleteRecursive($foldertoremove, true);
    Severity: Critical
    Found in htdocs/modules/system/include/update.php by phan

    Call to method __construct from undeclared class \icms_db_legacy_updater_Table
    Open

                $table = new icms_db_legacy_updater_Table($tabletoupdate);
    Severity: Critical
    Found in htdocs/modules/system/include/update.php by phan

    Call to method fieldExists from undeclared class \icms_db_legacy_updater_Table
    Open

                    if ($table->fieldExists($column)) {
    Severity: Critical
    Found in htdocs/modules/system/include/update.php by phan

    Call to method addDropedField from undeclared class \icms_db_legacy_updater_Table
    Open

                        $table->addDropedField($column);
    Severity: Critical
    Found in htdocs/modules/system/include/update.php by phan

    Reference to static property config from undeclared class \icms
    Open

                $config = icms::$config->getConfigs($criteria);
    Severity: Critical
    Found in htdocs/modules/system/include/update.php by phan

    Call to method error from undeclared class \icms_core_Message
    Open

            icms_core_Message::error(sprintf(_DATABASEUPDATER_UPDATE_ERR, icms_conv_nr2local($newDbVersion)), _DATABASEUPDATER_UPDATE_DB, TRUE);
    Severity: Critical
    Found in htdocs/modules/system/include/update.php by phan

    Call to method deleteFile from undeclared class \icms_core_Filesystem
    Open

                        icms_core_Filesystem::deleteFile($filetoremove);
    Severity: Critical
    Found in htdocs/modules/system/include/update.php by phan

    Call to method getDropedFields from undeclared class \icms_db_legacy_updater_Table
    Open

                if ($table->getDropedFields()) {
    Severity: Critical
    Found in htdocs/modules/system/include/update.php by phan

    Reference to undeclared constant \_DATABASEUPDATER_UPDATE_OK
    Open

                echo sprintf(_DATABASEUPDATER_UPDATE_OK, icms_conv_nr2local($newDbVersion)) . '<br />';

    Call to method dropTable from undeclared class \icms_db_legacy_updater_Table
    Open

                            $tableObj->dropTable();
    Severity: Critical
    Found in htdocs/modules/system/include/update.php by phan

    Reference to undeclared constant \_DATABASEUPDATER_UPDATE_OK
    Open

                    echo sprintf(_DATABASEUPDATER_UPDATE_OK, icms_conv_nr2local($newDbVersion)) . '<br />';

    TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
    Open

            icms_core_Message::error(sprintf(_DATABASEUPDATER_UPDATE_ERR, icms_conv_nr2local($newDbVersion)), _DATABASEUPDATER_UPDATE_DB, TRUE);

    Blank line found at start of control structure
    Open

            if ($dbVersion < $newDbVersion) {

    Tabs must be used to indent lines; spaces are not allowed
    Open

            

    Inline control structures are not allowed
    Open

        if ($dbVersion < 46) include 'update-14.php';

    Inline control structures are not allowed
    Open

        if (!$abortUpdate) $newDbVersion = 47;

    Inline control structures are not allowed
    Open

        if (!$abortUpdate) $newDbVersion = 48;

    Closing brace indented incorrectly; expected 12 spaces, found 8
    Open

            }

    Expected 1 space after closing brace; newline found
    Open

        }

    Expected 1 space after IF keyword; 0 found
    Open

                if(!defined('ICMS_INCLUDE_OPENID')) {

    Expected 1 space after closing brace; newline found
    Open

        }

    Line indented incorrectly; expected 1 tabs, found 2
    Open

            try {

    Line indented incorrectly; expected 4 tabs, found 5
    Open

                        }

    Line indented incorrectly; expected 2 tabs, found 3
    Open

                if ($dbVersion < $newDbVersion) {

    Line indented incorrectly; expected 4 tabs, found 5
    Open

                        if ($tableObj->exists()) {

    Line indented incorrectly; expected 3 tabs, found 4
    Open

                    foreach ($tablestodrop as $table) {

    Closing brace indented incorrectly; expected 8 spaces, found 4
    Open

        }

    Line indented incorrectly; expected 3 tabs, found 4
    Open

                    }

    The variable $duplicate_files is not named in camelCase.
    Open

    function xoops_module_update_system(&$module, $oldversion = null, $dbVersion = null) {
        global $xoTheme;
    
        $from_112 = $abortUpdate = false;
    
    

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $CleanWritingFolders is not named in camelCase.
    Open

    function xoops_module_update_system(&$module, $oldversion = null, $dbVersion = null) {
        global $xoTheme;
    
        $from_112 = $abortUpdate = false;
    
    

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $module_handler is not named in camelCase.
    Open

    function xoops_module_update_system(&$module, $oldversion = null, $dbVersion = null) {
        global $xoTheme;
    
        $from_112 = $abortUpdate = false;
    
    

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $tplfile_handler is not named in camelCase.
    Open

    function xoops_module_update_system(&$module, $oldversion = null, $dbVersion = null) {
        global $xoTheme;
    
        $from_112 = $abortUpdate = false;
    
    

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $duplicate_files is not named in camelCase.
    Open

    function xoops_module_update_system(&$module, $oldversion = null, $dbVersion = null) {
        global $xoTheme;
    
        $from_112 = $abortUpdate = false;
    
    

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $removeFolders_150 is not named in camelCase.
    Open

    function xoops_module_update_system(&$module, $oldversion = null, $dbVersion = null) {
        global $xoTheme;
    
        $from_112 = $abortUpdate = false;
    
    

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $module_handler is not named in camelCase.
    Open

    function xoops_module_update_system(&$module, $oldversion = null, $dbVersion = null) {
        global $xoTheme;
    
        $from_112 = $abortUpdate = false;
    
    

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $installed_mods is not named in camelCase.
    Open

    function xoops_module_update_system(&$module, $oldversion = null, $dbVersion = null) {
        global $xoTheme;
    
        $from_112 = $abortUpdate = false;
    
    

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $CleanWritingFolders is not named in camelCase.
    Open

    function xoops_module_update_system(&$module, $oldversion = null, $dbVersion = null) {
        global $xoTheme;
    
        $from_112 = $abortUpdate = false;
    
    

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $tplfile_handler is not named in camelCase.
    Open

    function xoops_module_update_system(&$module, $oldversion = null, $dbVersion = null) {
        global $xoTheme;
    
        $from_112 = $abortUpdate = false;
    
    

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $from_112 is not named in camelCase.
    Open

    function xoops_module_update_system(&$module, $oldversion = null, $dbVersion = null) {
        global $xoTheme;
    
        $from_112 = $abortUpdate = false;
    
    

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $from_112 is not named in camelCase.
    Open

    function xoops_module_update_system(&$module, $oldversion = null, $dbVersion = null) {
        global $xoTheme;
    
        $from_112 = $abortUpdate = false;
    
    

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $duplicate_files is not named in camelCase.
    Open

    function xoops_module_update_system(&$module, $oldversion = null, $dbVersion = null) {
        global $xoTheme;
    
        $from_112 = $abortUpdate = false;
    
    

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $removeFolders_150 is not named in camelCase.
    Open

    function xoops_module_update_system(&$module, $oldversion = null, $dbVersion = null) {
        global $xoTheme;
    
        $from_112 = $abortUpdate = false;
    
    

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $installed_mods is not named in camelCase.
    Open

    function xoops_module_update_system(&$module, $oldversion = null, $dbVersion = null) {
        global $xoTheme;
    
        $from_112 = $abortUpdate = false;
    
    

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $tplfile_handler is not named in camelCase.
    Open

    function xoops_module_update_system(&$module, $oldversion = null, $dbVersion = null) {
        global $xoTheme;
    
        $from_112 = $abortUpdate = false;
    
    

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    The variable $duplicate_files is not named in camelCase.
    Open

    function xoops_module_update_system(&$module, $oldversion = null, $dbVersion = null) {
        global $xoTheme;
    
        $from_112 = $abortUpdate = false;
    
    

    CamelCaseVariableName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example

    class ClassName {
        public function doSomething() {
            $data_module = new DataModule();
        }
    }

    Source

    Unexpected trailing spaces found.
    Open

        

    Unexpected trailing spaces found.
    Open

            

    Unexpected spaces found.
    Open

            

    There are no issues that match your filters.

    Category
    Status