XoopsModules25x/apcal

View on GitHub
admin/categories.php

Summary

Maintainability
C
1 day
Test Coverage

rebuild_cat_tree accesses the super-global variable $GLOBALS.
Open

function rebuild_cat_tree($cat_table)
{
    global $conn, $xoopsDB;

    $rs      = $GLOBALS['xoopsDB']->query("SELECT cid,pid FROM $cat_table ORDER BY pid ASC,weight DESC");
Severity: Minor
Found in admin/categories.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

rebuild_cat_tree accesses the super-global variable $GLOBALS.
Open

function rebuild_cat_tree($cat_table)
{
    global $conn, $xoopsDB;

    $rs      = $GLOBALS['xoopsDB']->query("SELECT cid,pid FROM $cat_table ORDER BY pid ASC,weight DESC");
Severity: Minor
Found in admin/categories.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

rebuild_cat_tree accesses the super-global variable $GLOBALS.
Open

function rebuild_cat_tree($cat_table)
{
    global $conn, $xoopsDB;

    $rs      = $GLOBALS['xoopsDB']->query("SELECT cid,pid FROM $cat_table ORDER BY pid ASC,weight DESC");
Severity: Minor
Found in admin/categories.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

rebuild_cat_tree accesses the super-global variable $GLOBALS.
Open

function rebuild_cat_tree($cat_table)
{
    global $conn, $xoopsDB;

    $rs      = $GLOBALS['xoopsDB']->query("SELECT cid,pid FROM $cat_table ORDER BY pid ASC,weight DESC");
Severity: Minor
Found in admin/categories.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

display_edit_form accesses the super-global variable $GLOBALS.
Open

function display_edit_form($cat, $form_title, $action)
{
    global $cattree, $xoopsModuleConfig;

    // Beggining of XoopsForm
Severity: Minor
Found in admin/categories.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

File categories.php has 299 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/*
 * You may not change or alter any portion of this comment or credits
 * of supporting developers from this source code or any supporting source code
 * which is considered copyrighted (c) material of the original comment or credit authors.
Severity: Minor
Found in admin/categories.php - About 3 hrs to fix

    Function rebuild_cat_tree has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
    Open

    function rebuild_cat_tree($cat_table)
    {
        global $conn, $xoopsDB;
    
        $rs      = $GLOBALS['xoopsDB']->query("SELECT cid,pid FROM $cat_table ORDER BY pid ASC,weight DESC");
    Severity: Minor
    Found in admin/categories.php - About 2 hrs 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 rebuild_cat_tree has 45 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function rebuild_cat_tree($cat_table)
    {
        global $conn, $xoopsDB;
    
        $rs      = $GLOBALS['xoopsDB']->query("SELECT cid,pid FROM $cat_table ORDER BY pid ASC,weight DESC");
    Severity: Minor
    Found in admin/categories.php - About 1 hr to fix

      Method display_edit_form has 44 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function display_edit_form($cat, $form_title, $action)
      {
          global $cattree, $xoopsModuleConfig;
      
          // Beggining of XoopsForm
      Severity: Minor
      Found in admin/categories.php - About 1 hr to fix

        Avoid using undefined variables such as '$cats' which will lead to PHP notices.
        Open

                $cat    =& $cats[$key];
        Severity: Minor
        Found in admin/categories.php by phpmd

        UndefinedVariable

        Since: 2.8.0

        Detects when a variable is used that has not been defined before.

        Example

        class Foo
        {
            private function bar()
            {
                // $message is undefined
                echo $message;
            }
        }

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

        Avoid using undefined variables such as '$cats' which will lead to PHP notices.
        Open

                $target =& $cats[0];
        Severity: Minor
        Found in admin/categories.php by phpmd

        UndefinedVariable

        Since: 2.8.0

        Detects when a variable is used that has not been defined before.

        Example

        class Foo
        {
            private function bar()
            {
                // $message is undefined
                echo $message;
            }
        }

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

        Avoid using undefined variables such as '$cats' which will lead to PHP notices.
        Open

            $cats[0] = array('cid' => 0, 'pid' => -1, 'next_key' => -1, 'depth' => 0);
        Severity: Minor
        Found in admin/categories.php by phpmd

        UndefinedVariable

        Since: 2.8.0

        Detects when a variable is used that has not been defined before.

        Example

        class Foo
        {
            private function bar()
            {
                // $message is undefined
                echo $message;
            }
        }

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

        Avoid using undefined variables such as '$cats' which will lead to PHP notices.
        Open

                $cats[$key] = array('cid' => (int)$cat->cid, 'pid' => (int)$cat->pid, 'next_key' => $key + 1, 'depth' => 0);
        Severity: Minor
        Found in admin/categories.php by phpmd

        UndefinedVariable

        Since: 2.8.0

        Detects when a variable is used that has not been defined before.

        Example

        class Foo
        {
            private function bar()
            {
                // $message is undefined
                echo $message;
            }
        }

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

        Missing class import via use statement (line '36', column '27').
        Open

            $form->addElement(new XoopsFormHidden('action', htmlspecialchars($action, ENT_QUOTES)));
        Severity: Minor
        Found in admin/categories.php by phpmd

        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 '54', column '37').
        Open

                $tarea_tray->addElement(new XoopsFormEditor('', 'cat_desc', $configs, false, $onfailure = 'textarea'));
        Severity: Minor
        Found in admin/categories.php by phpmd

        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 '75', column '31').
        Open

            $canbemain_checkbox = new XoopsFormCheckBox('', 'canbemain', (int)$cat->canbemain);
        Severity: Minor
        Found in admin/categories.php by phpmd

        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 '56', column '37').
        Open

                $tarea_tray->addElement(new XoopsFormDhtmlTextArea('', 'cat_desc', htmlspecialchars($cat->cat_desc, ENT_QUOTES), 15, 60));
        Severity: Minor
        Found in admin/categories.php by phpmd

        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 '85', column '27').
        Open

            $form->addElement(new XoopsFormLabel(_AM_APCAL_CAT_TH_LASTMODIFY, formatTimestamp($cat->udtstamp)));
        Severity: Minor
        Found in admin/categories.php by phpmd

        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 '89', column '34').
        Open

            $button_tray->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
        Severity: Minor
        Found in admin/categories.php by phpmd

        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 '33', column '17').
        Open

            $form = new XoopsThemeForm($form_title, 'MainForm', '');
        Severity: Minor
        Found in admin/categories.php by phpmd

        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 '65', column '27').
        Open

            $form->addElement(new XoopsFormLabel(_AM_APCAL_CAT_TH_PARENT, $cat_selbox));
        Severity: Minor
        Found in admin/categories.php by phpmd

        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 '72', column '32').
        Open

            $ismenuitem_checkbox = new XoopsFormCheckBox('', 'ismenuitem', (int)$cat->ismenuitem);
        Severity: Minor
        Found in admin/categories.php by phpmd

        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 '40', column '27').
        Open

            $form->addElement(new XoopsFormText(_AM_APCAL_CAT_TH_TITLE, 'cat_title', 60, 128, htmlspecialchars($cat->cat_title, ENT_QUOTES)), true);
        Severity: Minor
        Found in admin/categories.php by phpmd

        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 '82', column '27').
        Open

            $form->addElement(new XoopsFormColorPicker(_AM_APCAL_COLOR, 'color', $color), false);
        Severity: Minor
        Found in admin/categories.php by phpmd

        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 '90', column '34').
        Open

            $button_tray->addElement(new XoopsFormButton('', 'reset', _CANCEL, 'reset'));
        Severity: Minor
        Found in admin/categories.php by phpmd

        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 '43', column '23').
        Open

            $tarea_tray = new XoopsFormElementTray(_AM_APCAL_CAT_TH_DESC, '<br>');
        Severity: Minor
        Found in admin/categories.php by phpmd

        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 '68', column '27').
        Open

            $form->addElement(new XoopsFormText(_AM_APCAL_CAT_TH_WEIGHT, 'weight', 6, 6, (int)$cat->weight), true);
        Severity: Minor
        Found in admin/categories.php by phpmd

        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 '88', column '24').
        Open

            $button_tray = new XoopsFormElementTray('', '&nbsp;');
        Severity: Minor
        Found in admin/categories.php by phpmd

        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 '37', column '27').
        Open

            $form->addElement(new XoopsFormHidden('cid', (int)$cat->cid));
        Severity: Minor
        Found in admin/categories.php by phpmd

        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 '71', column '32').
        Open

            $checkbox_tray       = new XoopsFormElementTray(_AM_APCAL_CAT_TH_OPTIONS, '<br>');
        Severity: Minor
        Found in admin/categories.php by phpmd

        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

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

            } else {
                $tarea_tray->addElement(new XoopsFormDhtmlTextArea('', 'cat_desc', htmlspecialchars($cat->cat_desc, ENT_QUOTES), 15, 60));
            }
        Severity: Minor
        Found in admin/categories.php by phpmd

        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

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

                } else {
                    $loop_check = 4096;
                }
        Severity: Minor
        Found in admin/categories.php by phpmd

        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 unused local variables such as '$onfailure'.
        Open

                $tarea_tray->addElement(new XoopsFormEditor('', 'cat_desc', $configs, false, $onfailure = 'textarea'));
        Severity: Minor
        Found in admin/categories.php by phpmd

        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

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

            global $conn, $xoopsDB;
        Severity: Minor
        Found in admin/categories.php by phpmd

        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

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

            global $conn, $xoopsDB;
        Severity: Minor
        Found in admin/categories.php by phpmd

        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

        Each class must be in a namespace of at least one level (a top-level vendor name)
        Open

            class Dummy
        Severity: Minor
        Found in admin/categories.php by phpcodesniffer

        The property $cat_title is not named in camelCase.
        Open

            class Dummy
            {
                public $cid        = 0;
                public $pid        = 0;
                public $cat_title  = '';
        Severity: Minor
        Found in admin/categories.php by phpmd

        CamelCasePropertyName

        Since: 0.2

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

        Example

        class ClassName {
            protected $property_name;
        }

        Source

        The parameter $cat_table is not named in camelCase.
        Open

        function rebuild_cat_tree($cat_table)
        {
            global $conn, $xoopsDB;
        
            $rs      = $GLOBALS['xoopsDB']->query("SELECT cid,pid FROM $cat_table ORDER BY pid ASC,weight DESC");
        Severity: Minor
        Found in admin/categories.php by phpmd

        CamelCaseParameterName

        Since: 0.2

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

        Example

        class ClassName {
            public function doSomething($user_name) {
            }
        }

        Source

        The property $cat_desc is not named in camelCase.
        Open

            class Dummy
            {
                public $cid        = 0;
                public $pid        = 0;
                public $cat_title  = '';
        Severity: Minor
        Found in admin/categories.php by phpmd

        CamelCasePropertyName

        Since: 0.2

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

        Example

        class ClassName {
            protected $property_name;
        }

        Source

        Avoid variables with short names like $rs. Configured minimum length is 3.
        Open

            $rs      = $GLOBALS['xoopsDB']->query("SELECT cid,pid FROM $cat_table ORDER BY pid ASC,weight DESC");
        Severity: Minor
        Found in admin/categories.php by phpmd

        ShortVariable

        Since: 0.2

        Detects when a field, local, or parameter has a very short name.

        Example

        class Something {
            private $q = 15; // VIOLATION - Field
            public static function main( array $as ) { // VIOLATION - Formal
                $r = 20 + $this->q; // VIOLATION - Local
                for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                    $r += $this->q;
                }
            }
        }

        Source https://phpmd.org/rules/naming.html#shortvariable

        The parameter $form_title is not named in camelCase.
        Open

        function display_edit_form($cat, $form_title, $action)
        {
            global $cattree, $xoopsModuleConfig;
        
            // Beggining of XoopsForm
        Severity: Minor
        Found in admin/categories.php by phpmd

        CamelCaseParameterName

        Since: 0.2

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

        Example

        class ClassName {
            public function doSomething($user_name) {
            }
        }

        Source

        A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 28 and the first side effect is on line 157.
        Open

        <?php
        Severity: Minor
        Found in admin/categories.php by phpcodesniffer

        Blank line found at start of control structure
        Open

        if ($action === 'insert') {
        Severity: Minor
        Found in admin/categories.php by phpcodesniffer

        Blank line found at start of control structure
        Open

        } elseif ($action === 'update' && $_POST['cid'] > 0) {
        Severity: Minor
        Found in admin/categories.php by phpcodesniffer

        Blank line found at start of control structure
        Open

        } elseif (!empty($_POST['batch_update'])) {
        Severity: Minor
        Found in admin/categories.php by phpcodesniffer

        Blank line found at start of control structure
        Open

        if ($disp === 'edit' && $cid > 0) {
        Severity: Minor
        Found in admin/categories.php by phpcodesniffer

        Blank line found at start of control structure
        Open

        } elseif (!empty($_POST['delcat'])) {
        Severity: Minor
        Found in admin/categories.php by phpcodesniffer

        Blank line found at start of control structure
        Open

        } elseif ($disp === 'new') {
        Severity: Minor
        Found in admin/categories.php by phpcodesniffer

        Line exceeds 120 characters; contains 140 characters
        Open

                $GLOBALS['xoopsDB']->query("UPDATE $cat_table SET weight=" . ($weight * 10) . ",cat_depth={$cat['depth']} WHERE cid={$cat['cid']}");
        Severity: Minor
        Found in admin/categories.php by phpcodesniffer

        Line exceeds 120 characters; contains 124 characters
        Open

                if (!$GLOBALS['xoopsDB']->query("UPDATE $cal->cat_table SET weight='$weight', enabled='$enabled' WHERE cid=$cid")) {
        Severity: Minor
        Found in admin/categories.php by phpcodesniffer

        Line exceeds 120 characters; contains 154 characters
        Open

            echo "<p><a href='?disp=new&cid=0'>" . _AM_APCAL_MB_MAKETOPCAT . "<img src='../assets/images/cat_add.gif' width='18' height='15' alt='' /></a></p>\n";
        Severity: Minor
        Found in admin/categories.php by phpcodesniffer

        Line exceeds 120 characters; contains 136 characters
        Open

                <td colspan='4' align='right' class='head'><input type='submit' name='batch_update' value='" . _AM_APCAL_BTN_UPDATE . "' /></td>
        Severity: Minor
        Found in admin/categories.php by phpcodesniffer

        Line exceeds 120 characters; contains 121 characters
        Open

                <td class='$oddeven' align='center'><input type='checkbox' name='enabled[$cid]' value='1' $enable_checked /></td>
        Severity: Minor
        Found in admin/categories.php by phpcodesniffer

        Line exceeds 120 characters; contains 192 characters
        Open

                  <a href='?disp=edit&amp;cid=$cid'><img src='../assets/images/cat_edit.gif' width='18' height='15' alt='" . _AM_APCAL_MENU_CAT_EDIT . "' title='" . _AM_APCAL_MENU_CAT_EDIT . "' /></a>
        Severity: Minor
        Found in admin/categories.php by phpcodesniffer

        Line exceeds 120 characters; contains 140 characters
        Open

            $form->addElement(new XoopsFormText(_AM_APCAL_CAT_TH_TITLE, 'cat_title', 60, 128, htmlspecialchars($cat->cat_title, ENT_QUOTES)), true);
        Severity: Minor
        Found in admin/categories.php by phpcodesniffer

        Line exceeds 120 characters; contains 130 characters
        Open

                $tarea_tray->addElement(new XoopsFormDhtmlTextArea('', 'cat_desc', htmlspecialchars($cat->cat_desc, ENT_QUOTES), 15, 60));
        Severity: Minor
        Found in admin/categories.php by phpcodesniffer

        Line exceeds 120 characters; contains 161 characters
        Open

                  <a href='$mod_url/index.php?action=Edit&amp;cid=$cid' target='_blank'><img src='$cal->images_url/addevent.gif' border='0' width='14' height='12' /></a>
        Severity: Minor
        Found in admin/categories.php by phpcodesniffer

        Line exceeds 120 characters; contains 129 characters
        Open

                <td class='$oddeven' align='right'><input type='text' name='weights[$cid]' size='4' maxlength='6' value='$weight' /></td>
        Severity: Minor
        Found in admin/categories.php by phpcodesniffer

        Line exceeds 120 characters; contains 188 characters
        Open

                  <a href='?disp=new&amp;cid=$cid'><img src='../assets/images/cat_add.gif' width='18' height='15' alt='" . _AM_APCAL_MENU_CAT_NEW . "' title='" . _AM_APCAL_MENU_CAT_NEW . "' /></a>
        Severity: Minor
        Found in admin/categories.php by phpcodesniffer

        Line exceeds 120 characters; contains 139 characters
        Open

                  <input type='button' value='" . _DELETE . "'  onclick='if ($del_confirm) {document.MainForm.delcat.value=\"$cid\"; submit();}' />
        Severity: Minor
        Found in admin/categories.php by phpcodesniffer

        The variable $form_title is not named in camelCase.
        Open

        function display_edit_form($cat, $form_title, $action)
        {
            global $cattree, $xoopsModuleConfig;
        
            // Beggining of XoopsForm
        Severity: Minor
        Found in admin/categories.php by phpmd

        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 $tarea_tray is not named in camelCase.
        Open

        function display_edit_form($cat, $form_title, $action)
        {
            global $cattree, $xoopsModuleConfig;
        
            // Beggining of XoopsForm
        Severity: Minor
        Found in admin/categories.php by phpmd

        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 $ismenuitem_checkbox is not named in camelCase.
        Open

        function display_edit_form($cat, $form_title, $action)
        {
            global $cattree, $xoopsModuleConfig;
        
            // Beggining of XoopsForm
        Severity: Minor
        Found in admin/categories.php by phpmd

        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 $button_tray is not named in camelCase.
        Open

        function display_edit_form($cat, $form_title, $action)
        {
            global $cattree, $xoopsModuleConfig;
        
            // Beggining of XoopsForm
        Severity: Minor
        Found in admin/categories.php by phpmd

        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 $cat_table is not named in camelCase.
        Open

        function rebuild_cat_tree($cat_table)
        {
            global $conn, $xoopsDB;
        
            $rs      = $GLOBALS['xoopsDB']->query("SELECT cid,pid FROM $cat_table ORDER BY pid ASC,weight DESC");
        Severity: Minor
        Found in admin/categories.php by phpmd

        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 $loop_check is not named in camelCase.
        Open

        function rebuild_cat_tree($cat_table)
        {
            global $conn, $xoopsDB;
        
            $rs      = $GLOBALS['xoopsDB']->query("SELECT cid,pid FROM $cat_table ORDER BY pid ASC,weight DESC");
        Severity: Minor
        Found in admin/categories.php by phpmd

        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 $checkbox_tray is not named in camelCase.
        Open

        function display_edit_form($cat, $form_title, $action)
        {
            global $cattree, $xoopsModuleConfig;
        
            // Beggining of XoopsForm
        Severity: Minor
        Found in admin/categories.php by phpmd

        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 $cat_table is not named in camelCase.
        Open

        function rebuild_cat_tree($cat_table)
        {
            global $conn, $xoopsDB;
        
            $rs      = $GLOBALS['xoopsDB']->query("SELECT cid,pid FROM $cat_table ORDER BY pid ASC,weight DESC");
        Severity: Minor
        Found in admin/categories.php by phpmd

        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 $cat_backup is not named in camelCase.
        Open

        function rebuild_cat_tree($cat_table)
        {
            global $conn, $xoopsDB;
        
            $rs      = $GLOBALS['xoopsDB']->query("SELECT cid,pid FROM $cat_table ORDER BY pid ASC,weight DESC");
        Severity: Minor
        Found in admin/categories.php by phpmd

        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 $checkbox_tray is not named in camelCase.
        Open

        function display_edit_form($cat, $form_title, $action)
        {
            global $cattree, $xoopsModuleConfig;
        
            // Beggining of XoopsForm
        Severity: Minor
        Found in admin/categories.php by phpmd

        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 $checkbox_tray is not named in camelCase.
        Open

        function display_edit_form($cat, $form_title, $action)
        {
            global $cattree, $xoopsModuleConfig;
        
            // Beggining of XoopsForm
        Severity: Minor
        Found in admin/categories.php by phpmd

        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 $loop_check_for_key is not named in camelCase.
        Open

        function rebuild_cat_tree($cat_table)
        {
            global $conn, $xoopsDB;
        
            $rs      = $GLOBALS['xoopsDB']->query("SELECT cid,pid FROM $cat_table ORDER BY pid ASC,weight DESC");
        Severity: Minor
        Found in admin/categories.php by phpmd

        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 $loop_check is not named in camelCase.
        Open

        function rebuild_cat_tree($cat_table)
        {
            global $conn, $xoopsDB;
        
            $rs      = $GLOBALS['xoopsDB']->query("SELECT cid,pid FROM $cat_table ORDER BY pid ASC,weight DESC");
        Severity: Minor
        Found in admin/categories.php by phpmd

        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 $cat_backup is not named in camelCase.
        Open

        function rebuild_cat_tree($cat_table)
        {
            global $conn, $xoopsDB;
        
            $rs      = $GLOBALS['xoopsDB']->query("SELECT cid,pid FROM $cat_table ORDER BY pid ASC,weight DESC");
        Severity: Minor
        Found in admin/categories.php by phpmd

        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 $loop_check is not named in camelCase.
        Open

        function rebuild_cat_tree($cat_table)
        {
            global $conn, $xoopsDB;
        
            $rs      = $GLOBALS['xoopsDB']->query("SELECT cid,pid FROM $cat_table ORDER BY pid ASC,weight DESC");
        Severity: Minor
        Found in admin/categories.php by phpmd

        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 $cat_selbox is not named in camelCase.
        Open

        function display_edit_form($cat, $form_title, $action)
        {
            global $cattree, $xoopsModuleConfig;
        
            // Beggining of XoopsForm
        Severity: Minor
        Found in admin/categories.php by phpmd

        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 $canbemain_checkbox is not named in camelCase.
        Open

        function display_edit_form($cat, $form_title, $action)
        {
            global $cattree, $xoopsModuleConfig;
        
            // Beggining of XoopsForm
        Severity: Minor
        Found in admin/categories.php by phpmd

        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 $cat_table is not named in camelCase.
        Open

        function rebuild_cat_tree($cat_table)
        {
            global $conn, $xoopsDB;
        
            $rs      = $GLOBALS['xoopsDB']->query("SELECT cid,pid FROM $cat_table ORDER BY pid ASC,weight DESC");
        Severity: Minor
        Found in admin/categories.php by phpmd

        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 $ismenuitem_checkbox is not named in camelCase.
        Open

        function display_edit_form($cat, $form_title, $action)
        {
            global $cattree, $xoopsModuleConfig;
        
            // Beggining of XoopsForm
        Severity: Minor
        Found in admin/categories.php by phpmd

        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 $ismenuitem_checkbox is not named in camelCase.
        Open

        function display_edit_form($cat, $form_title, $action)
        {
            global $cattree, $xoopsModuleConfig;
        
            // Beggining of XoopsForm
        Severity: Minor
        Found in admin/categories.php by phpmd

        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 $tarea_tray is not named in camelCase.
        Open

        function display_edit_form($cat, $form_title, $action)
        {
            global $cattree, $xoopsModuleConfig;
        
            // Beggining of XoopsForm
        Severity: Minor
        Found in admin/categories.php by phpmd

        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 $canbemain_checkbox is not named in camelCase.
        Open

        function display_edit_form($cat, $form_title, $action)
        {
            global $cattree, $xoopsModuleConfig;
        
            // Beggining of XoopsForm
        Severity: Minor
        Found in admin/categories.php by phpmd

        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 $button_tray is not named in camelCase.
        Open

        function display_edit_form($cat, $form_title, $action)
        {
            global $cattree, $xoopsModuleConfig;
        
            // Beggining of XoopsForm
        Severity: Minor
        Found in admin/categories.php by phpmd

        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 $cat_selbox is not named in camelCase.
        Open

        function display_edit_form($cat, $form_title, $action)
        {
            global $cattree, $xoopsModuleConfig;
        
            // Beggining of XoopsForm
        Severity: Minor
        Found in admin/categories.php by phpmd

        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 $canbemain_checkbox is not named in camelCase.
        Open

        function display_edit_form($cat, $form_title, $action)
        {
            global $cattree, $xoopsModuleConfig;
        
            // Beggining of XoopsForm
        Severity: Minor
        Found in admin/categories.php by phpmd

        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 $checkbox_tray is not named in camelCase.
        Open

        function display_edit_form($cat, $form_title, $action)
        {
            global $cattree, $xoopsModuleConfig;
        
            // Beggining of XoopsForm
        Severity: Minor
        Found in admin/categories.php by phpmd

        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 $tarea_tray is not named in camelCase.
        Open

        function display_edit_form($cat, $form_title, $action)
        {
            global $cattree, $xoopsModuleConfig;
        
            // Beggining of XoopsForm
        Severity: Minor
        Found in admin/categories.php by phpmd

        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 $tarea_tray is not named in camelCase.
        Open

        function display_edit_form($cat, $form_title, $action)
        {
            global $cattree, $xoopsModuleConfig;
        
            // Beggining of XoopsForm
        Severity: Minor
        Found in admin/categories.php by phpmd

        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 $button_tray is not named in camelCase.
        Open

        function display_edit_form($cat, $form_title, $action)
        {
            global $cattree, $xoopsModuleConfig;
        
            // Beggining of XoopsForm
        Severity: Minor
        Found in admin/categories.php by phpmd

        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 $button_tray is not named in camelCase.
        Open

        function display_edit_form($cat, $form_title, $action)
        {
            global $cattree, $xoopsModuleConfig;
        
            // Beggining of XoopsForm
        Severity: Minor
        Found in admin/categories.php by phpmd

        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 $loop_check_for_key is not named in camelCase.
        Open

        function rebuild_cat_tree($cat_table)
        {
            global $conn, $xoopsDB;
        
            $rs      = $GLOBALS['xoopsDB']->query("SELECT cid,pid FROM $cat_table ORDER BY pid ASC,weight DESC");
        Severity: Minor
        Found in admin/categories.php by phpmd

        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

        There are no issues that match your filters.

        Category
        Status