XoopsModules25x/apcal

View on GitHub
admin/mygrouppermform.php

Summary

Maintainability
C
1 day
Test Coverage

Method render has 59 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function render()
    {
        global $xoopsGTicket;

        // load all child ids for javascript codes
Severity: Major
Found in admin/mygrouppermform.php - About 2 hrs to fix

    Method _renderOptionTree has 47 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function _renderOptionTree(&$tree, $option, $prefix, $parentIds = array())
        {
            $tree .= $prefix
                     . '<input type="checkbox" name="'
                     . $this->getName()
    Severity: Minor
    Found in admin/mygrouppermform.php - About 1 hr to fix

      Function render has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
      Open

          public function render()
          {
              global $xoopsGTicket;
      
              // load all child ids for javascript codes
      Severity: Minor
      Found in admin/mygrouppermform.php - About 1 hr 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

      Function render has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
      Open

          public function render()
          {
              $ret = '';
      
              if (count($this->_appendix) > 0) {
      Severity: Minor
      Found in admin/mygrouppermform.php - About 1 hr 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 render has 35 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function render()
          {
              $ret = '';
      
              if (count($this->_appendix) > 0) {
      Severity: Minor
      Found in admin/mygrouppermform.php - About 1 hr to fix

        Function _loadAllChildItemIds has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
        Open

            public function _loadAllChildItemIds($itemId, &$childIds)
            {
                if (!empty($this->_itemTree[$itemId]['children'])) {
                    $first_child = $this->_itemTree[$itemId]['children'];
                    foreach ($first_child as $fcid) {
        Severity: Minor
        Found in admin/mygrouppermform.php - About 1 hr 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

        Function _renderOptionTree has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            public function _renderOptionTree(&$tree, $option, $prefix, $parentIds = array())
            {
                $tree .= $prefix
                         . '<input type="checkbox" name="'
                         . $this->getName()
        Severity: Minor
        Found in admin/mygrouppermform.php - About 35 mins 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

        Missing class import via use statement (line '161', column '29').
        Open

                    $ele      = new MyXoopsGroupFormCheckBox($glist[$i], 'perms[' . $this->_permName . ']', $i, $selected);
        Severity: Minor
        Found in admin/mygrouppermform.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 '184', column '31').
        Open

                $tray->addElement(new XoopsFormButton('', 'reset', _CANCEL, 'reset'));
        Severity: Minor
        Found in admin/mygrouppermform.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 '185', column '31').
        Open

                $tray->addElement(new XoopsFormButton('', 'submit', _SUBMIT, 'submit'));
        Severity: Minor
        Found in admin/mygrouppermform.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 '173', column '32').
        Open

                $jstray          = new XoopsFormElementTray(' &nbsp; ');
        Severity: Minor
        Found in admin/mygrouppermform.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 '80', column '31').
        Open

                $this->addElement(new XoopsFormHidden('modid', $this->_modid));
        Severity: Minor
        Found in admin/mygrouppermform.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 '174', column '32').
        Open

                $jsuncheckbutton = new XoopsFormButton('', 'none', _NONE, 'button');
        Severity: Minor
        Found in admin/mygrouppermform.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 '176', column '30').
        Open

                $jscheckbutton = new XoopsFormButton('', 'all', _ALL, 'button');
        Severity: Minor
        Found in admin/mygrouppermform.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 '183', column '21').
        Open

                $tray = new XoopsFormElementTray('');
        Severity: Minor
        Found in admin/mygrouppermform.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 render uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
        Open

                    } else {
                        $ret .= $elements[$i]->render();
                    }
        Severity: Minor
        Found in admin/mygrouppermform.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 setValue uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
        Open

                } else {
                    $this->_value[] = $value;
                }
        Severity: Minor
        Found in admin/mygrouppermform.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

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

        class MyXoopsGroupFormCheckBox extends XoopsFormElement
        Severity: Minor
        Found in admin/mygrouppermform.php by phpcodesniffer

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

        class MyXoopsGroupPermForm extends XoopsForm
        Severity: Minor
        Found in admin/mygrouppermform.php by phpcodesniffer

        The property $_permName is not named in camelCase.
        Open

        class MyXoopsGroupPermForm extends XoopsForm
        {
            /**
             * Module ID
             * @var int
        Severity: Minor
        Found in admin/mygrouppermform.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 property $_groupId is not named in camelCase.
        Open

        class MyXoopsGroupFormCheckBox extends XoopsFormElement
        {
            /**
             * Pre-selected value(s)
             * @var array;
        Severity: Minor
        Found in admin/mygrouppermform.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 property $_permDesc is not named in camelCase.
        Open

        class MyXoopsGroupPermForm extends XoopsForm
        {
            /**
             * Module ID
             * @var int
        Severity: Minor
        Found in admin/mygrouppermform.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 property $_optionTree is not named in camelCase.
        Open

        class MyXoopsGroupFormCheckBox extends XoopsFormElement
        {
            /**
             * Pre-selected value(s)
             * @var array;
        Severity: Minor
        Found in admin/mygrouppermform.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 property $_modid is not named in camelCase.
        Open

        class MyXoopsGroupPermForm extends XoopsForm
        {
            /**
             * Module ID
             * @var int
        Severity: Minor
        Found in admin/mygrouppermform.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 property $_value is not named in camelCase.
        Open

        class MyXoopsGroupFormCheckBox extends XoopsFormElement
        {
            /**
             * Pre-selected value(s)
             * @var array;
        Severity: Minor
        Found in admin/mygrouppermform.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 property $_appendix is not named in camelCase.
        Open

        class MyXoopsGroupPermForm extends XoopsForm
        {
            /**
             * Module ID
             * @var int
        Severity: Minor
        Found in admin/mygrouppermform.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 property $_appendix is not named in camelCase.
        Open

        class MyXoopsGroupFormCheckBox extends XoopsFormElement
        {
            /**
             * Pre-selected value(s)
             * @var array;
        Severity: Minor
        Found in admin/mygrouppermform.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 property $_itemTree is not named in camelCase.
        Open

        class MyXoopsGroupPermForm extends XoopsForm
        {
            /**
             * Module ID
             * @var int
        Severity: Minor
        Found in admin/mygrouppermform.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

        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 38 and the first side effect is on line 21.
        Open

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

        Each class must be in a file by itself
        Open

        class MyXoopsGroupFormCheckBox extends XoopsFormElement
        Severity: Minor
        Found in admin/mygrouppermform.php by phpcodesniffer

        Property name "$_groupId" should not be prefixed with an underscore to indicate visibility
        Open

            public $_groupId;
        Severity: Minor
        Found in admin/mygrouppermform.php by phpcodesniffer

        Property name "$_permName" should not be prefixed with an underscore to indicate visibility
        Open

            public $_permName;
        Severity: Minor
        Found in admin/mygrouppermform.php by phpcodesniffer

        Property name "$_value" should not be prefixed with an underscore to indicate visibility
        Open

            public $_value;
        Severity: Minor
        Found in admin/mygrouppermform.php by phpcodesniffer

        Property name "$_appendix" should not be prefixed with an underscore to indicate visibility
        Open

            public $_appendix = array();
        Severity: Minor
        Found in admin/mygrouppermform.php by phpcodesniffer

        Property name "$_itemTree" should not be prefixed with an underscore to indicate visibility
        Open

            public $_itemTree = array();
        Severity: Minor
        Found in admin/mygrouppermform.php by phpcodesniffer

        Property name "$_appendix" should not be prefixed with an underscore to indicate visibility
        Open

            public $_appendix = array();
        Severity: Minor
        Found in admin/mygrouppermform.php by phpcodesniffer

        Property name "$_modid" should not be prefixed with an underscore to indicate visibility
        Open

            public $_modid;
        Severity: Minor
        Found in admin/mygrouppermform.php by phpcodesniffer

        Method name "_loadAllChildItemIds" should not be prefixed with an underscore to indicate visibility
        Open

            public function _loadAllChildItemIds($itemId, &$childIds)
        Severity: Minor
        Found in admin/mygrouppermform.php by phpcodesniffer

        Property name "$_permDesc" should not be prefixed with an underscore to indicate visibility
        Open

            public $_permDesc;
        Severity: Minor
        Found in admin/mygrouppermform.php by phpcodesniffer

        Property name "$_optionTree" should not be prefixed with an underscore to indicate visibility
        Open

            public $_optionTree;
        Severity: Minor
        Found in admin/mygrouppermform.php by phpcodesniffer

        Method name "_renderOptionTree" should not be prefixed with an underscore to indicate visibility
        Open

            public function _renderOptionTree(&$tree, $option, $prefix, $parentIds = array())
        Severity: Minor
        Found in admin/mygrouppermform.php by phpcodesniffer

        Line exceeds 120 characters; contains 138 characters
        Open

                        $this->_appendix[$key]['selected'] = $gpermHandler->checkRight($append['permname'], $append['itemid'], $i, $this->_modid);
        Severity: Minor
        Found in admin/mygrouppermform.php by phpcodesniffer

        Line exceeds 120 characters; contains 391 characters
        Open

                        $ret     .= "<td class=\"odd\"><input type=\"checkbox\" name=\"{$name}[groups][$this->_groupId][$itemid]\" id=\"{$name}[groups][$this->_groupId][$itemid]\" value=\"1\" $checked />{$append['itemname']}<input type=\"hidden\" name=\"{$name}[parents][$itemid]\" value=\"\" /><input type=\"hidden\" name=\"{$name}[itemname][$itemid]\" value=\"{$append['itemname']}\" /><br></td>";
        Severity: Minor
        Found in admin/mygrouppermform.php by phpcodesniffer

        Line exceeds 120 characters; contains 259 characters
        Open

                $jscheckbutton->setExtra("onclick=\"with(document.groupperm_form){for (i=0;i<length;i++) {if(elements[i].type=='checkbox' && (elements[i].name.indexOf('module_admin')<0 || elements[i].name.indexOf('[groups][1]')>=0)) {elements[i].checked=true;}}}\"");
        Severity: Minor
        Found in admin/mygrouppermform.php by phpcodesniffer

        Line exceeds 120 characters; contains 139 characters
        Open

                    $tree       .= "var ele = xoopsGetElementById('" . $parent_ele . "'); if (ele.checked !== true) {ele.checked = this.checked;}";
        Severity: Minor
        Found in admin/mygrouppermform.php by phpcodesniffer

        Line exceeds 120 characters; contains 131 characters
        Open

                    $tree      .= "var ele = xoopsGetElementById('" . $child_ele . "'); if (this.checked !== true) {ele.checked = false;}";
        Severity: Minor
        Found in admin/mygrouppermform.php by phpcodesniffer

        Line exceeds 120 characters; contains 169 characters
        Open

                $jsuncheckbutton->setExtra("onclick=\"with(document.groupperm_form){for (i=0;i<length;i++) {if (elements[i].type=='checkbox') {elements[i].checked=false;}}}\"");
        Severity: Minor
        Found in admin/mygrouppermform.php by phpcodesniffer

        The variable $item_id is not named in camelCase.
        Open

            public function render()
            {
                global $xoopsGTicket;
        
                // load all child ids for javascript codes
        Severity: Minor
        Found in admin/mygrouppermform.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 $first_child is not named in camelCase.
        Open

            public function _loadAllChildItemIds($itemId, &$childIds)
            {
                if (!empty($this->_itemTree[$itemId]['children'])) {
                    $first_child = $this->_itemTree[$itemId]['children'];
                    foreach ($first_child as $fcid) {
        Severity: Minor
        Found in admin/mygrouppermform.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 $parent_ele is not named in camelCase.
        Open

            public function _renderOptionTree(&$tree, $option, $prefix, $parentIds = array())
            {
                $tree .= $prefix
                         . '<input type="checkbox" name="'
                         . $this->getName()
        Severity: Minor
        Found in admin/mygrouppermform.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 $first_child is not named in camelCase.
        Open

            public function _loadAllChildItemIds($itemId, &$childIds)
            {
                if (!empty($this->_itemTree[$itemId]['children'])) {
                    $first_child = $this->_itemTree[$itemId]['children'];
                    foreach ($first_child as $fcid) {
        Severity: Minor
        Found in admin/mygrouppermform.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 $_fcid is not named in camelCase.
        Open

            public function _loadAllChildItemIds($itemId, &$childIds)
            {
                if (!empty($this->_itemTree[$itemId]['children'])) {
                    $first_child = $this->_itemTree[$itemId]['children'];
                    foreach ($first_child as $fcid) {
        Severity: Minor
        Found in admin/mygrouppermform.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 $parent_ele is not named in camelCase.
        Open

            public function _renderOptionTree(&$tree, $option, $prefix, $parentIds = array())
            {
                $tree .= $prefix
                         . '<input type="checkbox" name="'
                         . $this->getName()
        Severity: Minor
        Found in admin/mygrouppermform.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 $child_ele is not named in camelCase.
        Open

            public function _renderOptionTree(&$tree, $option, $prefix, $parentIds = array())
            {
                $tree .= $prefix
                         . '<input type="checkbox" name="'
                         . $this->getName()
        Severity: Minor
        Found in admin/mygrouppermform.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 $_fcid is not named in camelCase.
        Open

            public function _loadAllChildItemIds($itemId, &$childIds)
            {
                if (!empty($this->_itemTree[$itemId]['children'])) {
                    $first_child = $this->_itemTree[$itemId]['children'];
                    foreach ($first_child as $fcid) {
        Severity: Minor
        Found in admin/mygrouppermform.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 $child_ele is not named in camelCase.
        Open

            public function _renderOptionTree(&$tree, $option, $prefix, $parentIds = array())
            {
                $tree .= $prefix
                         . '<input type="checkbox" name="'
                         . $this->getName()
        Severity: Minor
        Found in admin/mygrouppermform.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 $item_id is not named in camelCase.
        Open

            public function render()
            {
                global $xoopsGTicket;
        
                // load all child ids for javascript codes
        Severity: Minor
        Found in admin/mygrouppermform.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 $_fcid is not named in camelCase.
        Open

            public function _loadAllChildItemIds($itemId, &$childIds)
            {
                if (!empty($this->_itemTree[$itemId]['children'])) {
                    $first_child = $this->_itemTree[$itemId]['children'];
                    foreach ($first_child as $fcid) {
        Severity: Minor
        Found in admin/mygrouppermform.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 $item_id is not named in camelCase.
        Open

            public function render()
            {
                global $xoopsGTicket;
        
                // load all child ids for javascript codes
        Severity: Minor
        Found in admin/mygrouppermform.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 $item_id is not named in camelCase.
        Open

            public function render()
            {
                global $xoopsGTicket;
        
                // load all child ids for javascript codes
        Severity: Minor
        Found in admin/mygrouppermform.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 method _loadAllChildItemIds is not named in camelCase.
        Open

            public function _loadAllChildItemIds($itemId, &$childIds)
            {
                if (!empty($this->_itemTree[$itemId]['children'])) {
                    $first_child = $this->_itemTree[$itemId]['children'];
                    foreach ($first_child as $fcid) {
        Severity: Minor
        Found in admin/mygrouppermform.php by phpmd

        CamelCaseMethodName

        Since: 0.2

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

        Example

        class ClassName {
            public function get_name() {
            }
        }

        Source

        The method _renderOptionTree is not named in camelCase.
        Open

            public function _renderOptionTree(&$tree, $option, $prefix, $parentIds = array())
            {
                $tree .= $prefix
                         . '<input type="checkbox" name="'
                         . $this->getName()
        Severity: Minor
        Found in admin/mygrouppermform.php by phpmd

        CamelCaseMethodName

        Since: 0.2

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

        Example

        class ClassName {
            public function get_name() {
            }
        }

        Source

        There are no issues that match your filters.

        Category
        Status