XoopsModules25x/xoopsinfo

View on GitHub
phpsysinfo/includes/output/class.Webpage.inc.php

Summary

Maintainability
B
6 hrs
Test Coverage

The method run() contains an eval expression.
Open

                    $blocks = eval(strtolower(PSI_BLOCKS));

EvalExpression

Since: 0.2

An eval-expression is untestable, a security risk and bad practice. Therefore it should be avoided. Consider to replace the eval-expression with regular code.

Example

class Foo {
    public function bar($param)  {
        if ($param === 42) {
            eval('$param = 23;');
        }
    }
}

Source https://phpmd.org/rules/design.html#evalexpression

Function run has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
Open

    public function run()
    {
        $this->_checkTemplateLanguage();

        $tpl = new Template("/templates/html/index_".$this->_indexname.".html");
Severity: Minor
Found in phpsysinfo/includes/output/class.Webpage.inc.php - About 3 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 run has 45 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function run()
    {
        $this->_checkTemplateLanguage();

        $tpl = new Template("/templates/html/index_".$this->_indexname.".html");
Severity: Minor
Found in phpsysinfo/includes/output/class.Webpage.inc.php - About 1 hr to fix

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

        private function _getTemplateList()
        {
            $dirlist = CommonFunctions::gdc(PSI_APP_ROOT.'/templates/');
            sort($dirlist);
            foreach ($dirlist as $file) {
    Severity: Minor
    Found in phpsysinfo/includes/output/class.Webpage.inc.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

    The method run() has an NPath complexity of 466944. The configured NPath complexity threshold is 200.
    Open

        public function run()
        {
            $this->_checkTemplateLanguage();
    
            $tpl = new Template("/templates/html/index_".$this->_indexname.".html");

    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 method run() has a Cyclomatic Complexity of 24. The configured cyclomatic complexity threshold is 10.
    Open

        public function run()
        {
            $this->_checkTemplateLanguage();
    
            $tpl = new Template("/templates/html/index_".$this->_indexname.".html");

    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

    The method _checkTemplateLanguage() has a Cyclomatic Complexity of 12. The configured cyclomatic complexity threshold is 10.
    Open

        private function _checkTemplateLanguage()
        {
            if (!defined("PSI_DEFAULT_TEMPLATE") || (($this->_template = strtolower(trim(PSI_DEFAULT_TEMPLATE))) == "") || !file_exists(PSI_APP_ROOT.'/templates/'.$this->_template.".css")) {
                $this->_template = 'phpsysinfo';
            }

    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 '174', column '20').
    Open

            $tpl = new Template("/templates/html/index_".$this->_indexname.".html");

    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 'CommonFunctions' in method '_getLanguageList'.
    Open

            $dirlist = CommonFunctions::gdc(PSI_APP_ROOT.'/language/');

    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 assigning values to variables in if clauses and the like (line '119', column '47').
    Open

        private function _checkTemplateLanguage()
        {
            if (!defined("PSI_DEFAULT_TEMPLATE") || (($this->_template = strtolower(trim(PSI_DEFAULT_TEMPLATE))) == "") || !file_exists(PSI_APP_ROOT.'/templates/'.$this->_template.".css")) {
                $this->_template = 'phpsysinfo';
            }

    IfStatementAssignment

    Since: 2.7.0

    Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

    Example

    class Foo
    {
        public function bar($flag)
        {
            if ($foo = 'bar') { // possible typo
                // ...
            }
            if ($baz = 0) { // always false
                // ...
            }
        }
    }

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

    Avoid using static access to class 'CommonFunctions' in method '_getTemplateList'.
    Open

            $dirlist = CommonFunctions::gdc(PSI_APP_ROOT.'/templates/');

    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 assigning values to variables in if clauses and the like (line '114', column '61').
    Open

        private function _checkTemplateLanguage()
        {
            if (!defined("PSI_DEFAULT_TEMPLATE") || (($this->_template = strtolower(trim(PSI_DEFAULT_TEMPLATE))) == "") || !file_exists(PSI_APP_ROOT.'/templates/'.$this->_template.".css")) {
                $this->_template = 'phpsysinfo';
            }

    IfStatementAssignment

    Since: 2.7.0

    Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

    Example

    class Foo
    {
        public function bar($flag)
        {
            if ($foo = 'bar') { // possible typo
                // ...
            }
            if ($baz = 0) { // always false
                // ...
            }
        }
    }

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

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

                    } else {
                        array_push($this->_templates, $tpl_name);
                    }

    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 run uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
    Open

                    } else {
                        $blocks = array(strtolower(PSI_BLOCKS));
                    }

    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 run uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
    Open

            } else {
                $tpl->set("blocks", 'true');
            }

    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 assigning values to variables in if clauses and the like (line '111', column '51').
    Open

        private function _checkTemplateLanguage()
        {
            if (!defined("PSI_DEFAULT_TEMPLATE") || (($this->_template = strtolower(trim(PSI_DEFAULT_TEMPLATE))) == "") || !file_exists(PSI_APP_ROOT.'/templates/'.$this->_template.".css")) {
                $this->_template = 'phpsysinfo';
            }

    IfStatementAssignment

    Since: 2.7.0

    Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

    Example

    class Foo
    {
        public function bar($flag)
        {
            if ($foo = 'bar') { // possible typo
                // ...
            }
            if ($baz = 0) { // always false
                // ...
            }
        }
    }

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

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

                            } else {
                                $blocklist .= ','.$block;
                            }

    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 Webpage extends Output implements PSI_Interface_Output

    The property $_templates is not named in camelCase.
    Open

    class Webpage extends Output implements PSI_Interface_Output
    {
        /**
         * configured indexname
         *

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

    class Webpage extends Output implements PSI_Interface_Output
    {
        /**
         * configured indexname
         *

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

    class Webpage extends Output implements PSI_Interface_Output
    {
        /**
         * configured indexname
         *

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

    class Webpage extends Output implements PSI_Interface_Output
    {
        /**
         * configured indexname
         *

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

    class Webpage extends Output implements PSI_Interface_Output
    {
        /**
         * configured indexname
         *

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

    class Webpage extends Output implements PSI_Interface_Output
    {
        /**
         * configured indexname
         *

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

    class Webpage extends Output implements PSI_Interface_Output
    {
        /**
         * configured indexname
         *

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

    class Webpage extends Output implements PSI_Interface_Output
    {
        /**
         * configured indexname
         *

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

    class Webpage extends Output implements PSI_Interface_Output
    {
        /**
         * configured indexname
         *

    CamelCasePropertyName

    Since: 0.2

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

    Example

    class ClassName {
        protected $property_name;
    }

    Source

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

        private function _getTemplateList()

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

        private function _checkTemplateLanguage()

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

        private $_indexname;

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

        private $_bootstrap_templates = array();

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

        private $_languages = array();

    Incorrect spacing between argument "$indexname" and equals sign; expected 1 but found 0
    Open

        public function __construct($indexname="dynamic")

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

        private $_language;

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

        private $_templates = array();

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

        private $_pick_template;

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

        private $_template;

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

        private $_bootstrap_template;

    Incorrect spacing between default value and equals sign for argument "$indexname"; expected 1 but found 0
    Open

        public function __construct($indexname="dynamic")

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

        private $_pick_language;

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

        private function _getLanguageList()

    Line exceeds 120 characters; contains 186 characters
    Open

            if (!defined("PSI_DEFAULT_TEMPLATE") || (($this->_template = strtolower(trim(PSI_DEFAULT_TEMPLATE))) == "") || !file_exists(PSI_APP_ROOT.'/templates/'.$this->_template.".css")) {

    Line exceeds 120 characters; contains 152 characters
    Open

            $tpl->set("showMemoryInfosExpanded", defined('PSI_SHOW_MEMORY_INFOS_EXPANDED') ? (PSI_SHOW_MEMORY_INFOS_EXPANDED ? 'true' : 'false') : 'false');

    Line exceeds 120 characters; contains 137 characters
    Open

            $tpl->set("showCPUListExpanded", defined('PSI_SHOW_CPULIST_EXPANDED') ? (PSI_SHOW_CPULIST_EXPANDED ? 'true' : 'false') : 'true');

    Line exceeds 120 characters; contains 177 characters
    Open

            if (!defined("PSI_DEFAULT_LANG") || (($this->_language = strtolower(trim(PSI_DEFAULT_LANG))) == "") || !file_exists(PSI_APP_ROOT.'/language/'.$this->_language.".xml")) {

    Line exceeds 120 characters; contains 214 characters
    Open

            $tpl->set("showNetworkActiveSpeed", defined('PSI_SHOW_NETWORK_ACTIVE_SPEED') ? (PSI_SHOW_NETWORK_ACTIVE_SPEED ? ((strtolower(PSI_SHOW_NETWORK_ACTIVE_SPEED) === 'bps') ? 'bps' :'true') : 'false') : 'false');

    Line exceeds 120 characters; contains 138 characters
    Open

            $tpl->set("hideBootstrapLoader", defined('PSI_HIDE_BOOTSTRAP_LOADER') ? (PSI_HIDE_BOOTSTRAP_LOADER ? 'true' : 'false') : 'false');

    Line exceeds 120 characters; contains 155 characters
    Open

            $tpl->set("showNetworkInfosExpanded", defined('PSI_SHOW_NETWORK_INFOS_EXPANDED') ? (PSI_SHOW_NETWORK_INFOS_EXPANDED ? 'true' : 'false') : 'false');

    Line exceeds 120 characters; contains 138 characters
    Open

            $tpl->set("showCPULoadCompact", defined('PSI_LOAD_BAR') ? ((strtolower(PSI_LOAD_BAR) === 'compact') ? 'true' :'false') : 'false');

    Line exceeds 120 characters; contains 153 characters
    Open

                    $validblocks = array('vitals','hardware','memory','filesystem','network','voltage','current','temperature','fans','power','other','ups');

    Line exceeds 120 characters; contains 236 characters
    Open

            if (!defined("PSI_DEFAULT_BOOTSTRAP_TEMPLATE") || (($this->_bootstrap_template = strtolower(trim(PSI_DEFAULT_BOOTSTRAP_TEMPLATE))) == "") || !file_exists(PSI_APP_ROOT.'/templates/'.$this->_bootstrap_template."_bootstrap.css")) {

    Line exceeds 120 characters; contains 132 characters
    Open

     * @license   http://opensource.org/licenses/gpl-2.0.php GNU General Public License version 2, or (at your option) any later version

    Line exceeds 120 characters; contains 138 characters
    Open

            $tpl->set("showCPUInfoExpanded", defined('PSI_SHOW_CPUINFO_EXPANDED') ? (PSI_SHOW_CPUINFO_EXPANDED ? 'true' : 'false') : 'false');

    Line exceeds 120 characters; contains 132 characters
    Open

     * @license   http://opensource.org/licenses/gpl-2.0.php GNU General Public License version 2, or (at your option) any later version

    The variable $ar_buf is not named in camelCase.
    Open

        private function _getTemplateList()
        {
            $dirlist = CommonFunctions::gdc(PSI_APP_ROOT.'/templates/');
            sort($dirlist);
            foreach ($dirlist as $file) {

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

        private function _getLanguageList()
        {
            $dirlist = CommonFunctions::gdc(PSI_APP_ROOT.'/language/');
            sort($dirlist);
            foreach ($dirlist as $file) {

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

        private function _getTemplateList()
        {
            $dirlist = CommonFunctions::gdc(PSI_APP_ROOT.'/templates/');
            sort($dirlist);
            foreach ($dirlist as $file) {

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

        private function _getTemplateList()
        {
            $dirlist = CommonFunctions::gdc(PSI_APP_ROOT.'/templates/');
            sort($dirlist);
            foreach ($dirlist as $file) {

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

        private function _getLanguageList()
        {
            $dirlist = CommonFunctions::gdc(PSI_APP_ROOT.'/language/');
            sort($dirlist);
            foreach ($dirlist as $file) {

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

        private function _getTemplateList()
        {
            $dirlist = CommonFunctions::gdc(PSI_APP_ROOT.'/templates/');
            sort($dirlist);
            foreach ($dirlist as $file) {

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

        private function _getLanguageList()
        {
            $dirlist = CommonFunctions::gdc(PSI_APP_ROOT.'/language/');
            sort($dirlist);
            foreach ($dirlist as $file) {

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

        private function _getTemplateList()
        {
            $dirlist = CommonFunctions::gdc(PSI_APP_ROOT.'/templates/');
            sort($dirlist);
            foreach ($dirlist as $file) {

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

        private function _getTemplateList()
        {
            $dirlist = CommonFunctions::gdc(PSI_APP_ROOT.'/templates/');
            sort($dirlist);
            foreach ($dirlist as $file) {

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

        private function _getTemplateList()
        {
            $dirlist = CommonFunctions::gdc(PSI_APP_ROOT.'/templates/');
            sort($dirlist);
            foreach ($dirlist as $file) {

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

        private function _getLanguageList()
        {
            $dirlist = CommonFunctions::gdc(PSI_APP_ROOT.'/language/');
            sort($dirlist);
            foreach ($dirlist as $file) {

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

        private function _getTemplateList()
        {
            $dirlist = CommonFunctions::gdc(PSI_APP_ROOT.'/templates/');
            sort($dirlist);
            foreach ($dirlist as $file) {

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

        private function _getLanguageList()
        {
            $dirlist = CommonFunctions::gdc(PSI_APP_ROOT.'/language/');
            sort($dirlist);
            foreach ($dirlist as $file) {

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

        private function _checkTemplateLanguage()
        {
            if (!defined("PSI_DEFAULT_TEMPLATE") || (($this->_template = strtolower(trim(PSI_DEFAULT_TEMPLATE))) == "") || !file_exists(PSI_APP_ROOT.'/templates/'.$this->_template.".css")) {
                $this->_template = 'phpsysinfo';
            }

    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