The function icms_cp_header() contains an eval expression. Open
$admin_menu = eval('return ' . $file . ';');
- Read upRead up
- Exclude checks
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
icms_cp_header accesses the super-global variable $_SESSION. Open
function icms_cp_header() {
global $icmsConfig, $icmsConfigPlugins, $icmsConfigPersona, $xoopsModule, $xoopsTpl, $xoopsOption, $icmsTheme, $xoTheme, $icmsConfigMultilang, $icmsAdminTpl;
icms::$logger->stopTime('Module init');
icms::$logger->startTime('ImpressCMS CP Output Init');
- Read upRead up
- Exclude checks
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
icms_cp_header accesses the super-global variable $_SESSION. Open
function icms_cp_header() {
global $icmsConfig, $icmsConfigPlugins, $icmsConfigPersona, $xoopsModule, $xoopsTpl, $xoopsOption, $icmsTheme, $xoTheme, $icmsConfigMultilang, $icmsAdminTpl;
icms::$logger->stopTime('Module init');
icms::$logger->startTime('ImpressCMS CP Output Init');
- Read upRead up
- Exclude checks
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
icms_cp_header accesses the super-global variable $_SESSION. Open
function icms_cp_header() {
global $icmsConfig, $icmsConfigPlugins, $icmsConfigPersona, $xoopsModule, $xoopsTpl, $xoopsOption, $icmsTheme, $xoTheme, $icmsConfigMultilang, $icmsAdminTpl;
icms::$logger->stopTime('Module init');
icms::$logger->startTime('ImpressCMS CP Output Init');
- Read upRead up
- Exclude checks
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
Function icms_cp_header
has a Cognitive Complexity of 161 (exceeds 5 allowed). Consider refactoring. Open
function icms_cp_header() {
global $icmsConfig, $icmsConfigPlugins, $icmsConfigPersona, $xoopsModule, $xoopsTpl, $xoopsOption, $icmsTheme, $xoTheme, $icmsConfigMultilang, $icmsAdminTpl;
icms::$logger->stopTime('Module init');
icms::$logger->startTime('ImpressCMS CP Output Init');
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method icms_cp_header
has 234 lines of code (exceeds 25 allowed). Consider refactoring. Open
function icms_cp_header() {
global $icmsConfig, $icmsConfigPlugins, $icmsConfigPersona, $xoopsModule, $xoopsTpl, $xoopsOption, $icmsTheme, $xoTheme, $icmsConfigMultilang, $icmsAdminTpl;
icms::$logger->stopTime('Module init');
icms::$logger->startTime('ImpressCMS CP Output Init');
File cp_functions.php
has 388 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
// $Id: cp_functions.php 12313 2013-09-15 21:14:35Z skenow $
// ------------------------------------------------------------------------ //
// XOOPS - PHP Content Management System //
// Copyright (c) 2000 XOOPS.org //
Method impresscms_get_adminmenu
has 101 lines of code (exceeds 25 allowed). Consider refactoring. Open
function impresscms_get_adminmenu() {
$admin_menu = array();
$modules_menu = array();
$systemadm = false;
Function impresscms_get_adminmenu
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
function impresscms_get_adminmenu() {
$admin_menu = array();
$modules_menu = array();
$systemadm = false;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function icms_cp_footer
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function icms_cp_footer() {
global $xoopsOption, $xoTheme;
icms::$logger->stopTime('Module display');
if (!headers_sent()) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
The function icms_cp_header() has an NPath complexity of 6463162368. The configured NPath complexity threshold is 200. Open
function icms_cp_header() {
global $icmsConfig, $icmsConfigPlugins, $icmsConfigPersona, $xoopsModule, $xoopsTpl, $xoopsOption, $icmsTheme, $xoTheme, $icmsConfigMultilang, $icmsAdminTpl;
icms::$logger->stopTime('Module init');
icms::$logger->startTime('ImpressCMS CP Output Init');
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
The function icms_cp_header() has 315 lines of code. Current threshold is set to 100. Avoid really long methods. Open
function icms_cp_header() {
global $icmsConfig, $icmsConfigPlugins, $icmsConfigPersona, $xoopsModule, $xoopsTpl, $xoopsOption, $icmsTheme, $xoTheme, $icmsConfigMultilang, $icmsAdminTpl;
icms::$logger->stopTime('Module init');
icms::$logger->startTime('ImpressCMS CP Output Init');
- Exclude checks
The function impresscms_get_adminmenu() has 132 lines of code. Current threshold is set to 100. Avoid really long methods. Open
function impresscms_get_adminmenu() {
$admin_menu = array();
$modules_menu = array();
$systemadm = false;
- Exclude checks
The function impresscms_get_adminmenu() has an NPath complexity of 11524. The configured NPath complexity threshold is 200. Open
function impresscms_get_adminmenu() {
$admin_menu = array();
$modules_menu = array();
$systemadm = false;
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
The function icms_cp_header() has a Cyclomatic Complexity of 66. The configured cyclomatic complexity threshold is 10. Open
function icms_cp_header() {
global $icmsConfig, $icmsConfigPlugins, $icmsConfigPersona, $xoopsModule, $xoopsTpl, $xoopsOption, $icmsTheme, $xoTheme, $icmsConfigMultilang, $icmsAdminTpl;
icms::$logger->stopTime('Module init');
icms::$logger->startTime('ImpressCMS CP Output Init');
- Read upRead up
- Exclude checks
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 function impresscms_get_adminmenu() has a Cyclomatic Complexity of 19. The configured cyclomatic complexity threshold is 10. Open
function impresscms_get_adminmenu() {
$admin_menu = array();
$modules_menu = array();
$systemadm = false;
- Read upRead up
- Exclude checks
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
Avoid using undefined variables such as '$column' which will lead to PHP notices. Open
$column[] = $sortarray['title'];
- Read upRead up
- Exclude checks
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
Remove error control operator '@' on line 102. Open
function icms_cp_header() {
global $icmsConfig, $icmsConfigPlugins, $icmsConfigPersona, $xoopsModule, $xoopsTpl, $xoopsOption, $icmsTheme, $xoTheme, $icmsConfigMultilang, $icmsAdminTpl;
icms::$logger->stopTime('Module init');
icms::$logger->startTime('ImpressCMS CP Output Init');
- Read upRead up
- Exclude checks
ErrorControlOperator
Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.
Example
function foo($filePath) {
$file = @fopen($filPath); // hides exceptions
$key = @$array[$notExistingKey]; // assigns null to $key
}
Source http://phpmd.org/rules/cleancode.html#errorcontroloperator
Remove error control operator '@' on line 353. Open
function icms_cp_header() {
global $icmsConfig, $icmsConfigPlugins, $icmsConfigPersona, $xoopsModule, $xoopsTpl, $xoopsOption, $icmsTheme, $xoTheme, $icmsConfigMultilang, $icmsAdminTpl;
icms::$logger->stopTime('Module init');
icms::$logger->startTime('ImpressCMS CP Output Init');
- Read upRead up
- Exclude checks
ErrorControlOperator
Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.
Example
function foo($filePath) {
$file = @fopen($filPath); // hides exceptions
$key = @$array[$notExistingKey]; // assigns null to $key
}
Source http://phpmd.org/rules/cleancode.html#errorcontroloperator
Remove error control operator '@' on line 89. Open
function icms_cp_header() {
global $icmsConfig, $icmsConfigPlugins, $icmsConfigPersona, $xoopsModule, $xoopsTpl, $xoopsOption, $icmsTheme, $xoTheme, $icmsConfigMultilang, $icmsAdminTpl;
icms::$logger->stopTime('Module init');
icms::$logger->startTime('ImpressCMS CP Output Init');
- Read upRead up
- Exclude checks
ErrorControlOperator
Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.
Example
function foo($filePath) {
$file = @fopen($filPath); // hides exceptions
$key = @$array[$notExistingKey]; // assigns null to $key
}
Source http://phpmd.org/rules/cleancode.html#errorcontroloperator
Missing class import via use statement (line '479', column '21'). Open
$criteria->add(new icms_db_criteria_Item('hasadmin', 1));
- Read upRead up
- Exclude checks
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 '480', column '21'). Open
$criteria->add(new icms_db_criteria_Item('isactive', 1));
- Read upRead up
- Exclude checks
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 '84', column '22'). Open
$icmsAdminTpl = new icms_view_Tpl();
- Read upRead up
- Exclude checks
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 '95', column '27'). Open
$xoopsThemeFactory = new icms_view_theme_Factory();
- Read upRead up
- Exclude checks
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 '478', column '18'). Open
$criteria = new icms_db_criteria_Compo();
- Read upRead up
- Exclude checks
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 icms_cp_header uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$extension = include_once ICMS_ROOT_PATH . '/plugins/textsanitizer/' . $key . '/' . $key . '.php';
$func = 'style_' . $key;
if (function_exists($func)) {
$style_info = $func();
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid using static access to class 'icms' in method 'icms_cp_header'. Open
$sysperm_handler = icms::handler('icms_member_groupperm');
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
The method icms_cp_header uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$all_ok = true;
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid using static access to class 'icms' in method 'impresscms_get_adminmenu'. Open
$module_handler = icms::handler('icms_module');
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
The method icms_cp_header uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$icmsAdminTpl->assign('systemadm', 0);
}
- Read upRead up
- Exclude checks
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 icms_cp_footer uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$xoTheme->contentTemplate = $xoopsOption['template_main'];
}
- Read upRead up
- Exclude checks
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 icms_cp_header uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
foreach ($mods as $mod) {
if ($mod['dir'] == icms::$module->getVar('dirname')) {
$m = $mod; // Getting info of the current module
break;
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid using static access to class 'icms' in method 'impresscms_get_adminmenu'. Open
$module_handler = icms::handler('icms_module');
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class 'icms' in method 'icms_cp_header'. Open
$module_handler = icms::handler('icms_module');
- Read upRead up
- Exclude checks
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 '586', column '7'). Open
function xoops_module_write_admin_menu($content) {
global $icmsConfig;
$filename = ICMS_CACHE_PATH . '/adminmenu_' . $icmsConfig['language'] . '.php';
if (!$file = fopen($filename, "w")) {
echo 'failed open file';
- Read upRead up
- Exclude checks
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 'icms' in method 'icms_cp_header'. Open
$moduleperm_handler = icms::handler('icms_member_groupperm');
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class 'icms_core_Filesystem' in method 'xoops_module_write_admin_menu'. Open
icms_core_Filesystem::writeIndexFile(ICMS_CACHE_PATH);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
The method icms_cp_header uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$xoTheme->addStylesheet($style_info, array('media' => 'screen'));
}
- Read upRead up
- Exclude checks
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 icms_cp_header uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$icmsAdminTpl->assign('modulesadm', 0);
}
- Read upRead up
- Exclude checks
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 '$xoopsTpl'. Open
global $icmsConfig, $icmsConfigPlugins, $icmsConfigPersona, $xoopsModule, $xoopsTpl, $xoopsOption, $icmsTheme, $xoTheme, $icmsConfigMultilang, $icmsAdminTpl;
- Read upRead up
- Exclude checks
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 '$extension'. Open
$extension = include_once ICMS_ROOT_PATH . '/plugins/textsanitizer/' . $key . '/' . $key . '.php';
- Read upRead up
- Exclude checks
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 '$xoopsModule'. Open
global $icmsConfig, $icmsConfigPlugins, $icmsConfigPersona, $xoopsModule, $xoopsTpl, $xoopsOption, $icmsTheme, $xoTheme, $icmsConfigMultilang, $icmsAdminTpl;
- Read upRead up
- Exclude checks
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 '$systemadm'. Open
$systemadm = false;
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
TODO found Open
// TODO: Remove all this after a few versions!!
- Exclude checks
Reference to static property preload
from undeclared class \icms
Open
icms::$preload->triggerEvent('adminHeader');
- Exclude checks
Reference to undeclared constant \_CHARSET
Open
header('Content-Type:text/html; charset=' . _CHARSET);
- Exclude checks
Reference to instance property defaultTheme
from undeclared class \icms_view_theme_Factory
Open
if (isset($icmsConfig['theme_admin_set'])) $xoopsThemeFactory->defaultTheme = $icmsConfig['theme_admin_set'];
- Exclude checks
Call to method createInstance
from undeclared class \icms_view_theme_Factory
Open
$icmsTheme = $xoTheme = &$xoopsThemeFactory->createInstance(array('contentTemplate' => @$xoopsOption['template_main'],
- Exclude checks
Reference to static property module
from undeclared class \icms
Open
$icmsAdminTpl->assign('modpath', ICMS_URL . '/modules/' . icms::$module->getVar('dirname'));
- Exclude checks
Reference to static property module
from undeclared class \icms
Open
$icmsAdminTpl->assign('moddir', icms::$module->getVar('dirname'));
- Exclude checks
Call to method add
from undeclared class \icms_db_criteria_Compo
Open
$criteria->add(new icms_db_criteria_Item('hasadmin', 1));
- Exclude checks
Call to method writeIndexFile
from undeclared class \icms_core_Filesystem
Open
icms_core_Filesystem::writeIndexFile(ICMS_CACHE_PATH);
- Exclude checks
Reference to static property logger
from undeclared class \icms
Open
icms::$logger->stopTime('Module init');
- Exclude checks
Call to method __construct
from undeclared class \icms_view_Tpl
Open
$icmsAdminTpl = new icms_view_Tpl();
- Exclude checks
Reference to static property module
from undeclared class \icms
Open
if (icms::$module) {
- Exclude checks
Variable $reversed_sysprefs
was undeclared, but array fields are being added to it. Open
$reversed_sysprefs[] = $sysprefs[$i];
- Exclude checks
Call to method handler
from undeclared class \icms
Open
$module_handler = icms::handler('icms_module');
- Exclude checks
Reference to undeclared constant \_ABOUT
Open
$admin_menu[] = array('id' => 'news', 'text' => _ABOUT, 'link' => '#', 'menu' => $menu);
- Exclude checks
Reference to instance property allowedThemes
from undeclared class \icms_view_theme_Factory
Open
$xoopsThemeFactory->allowedThemes = $icmsConfig['theme_set_allowed'];
- Exclude checks
Reference to undeclared constant \_LANGCODE
Open
if (_LANGCODE != 'en') {
- Exclude checks
Reference to static property logger
from undeclared class \icms
Open
icms::$logger->startTime('ImpressCMS CP Output Init');
- Exclude checks
Argument 1 (content)
is array
but \xoops_module_write_admin_menu()
takes string
defined at /code/htdocs/include/cp_functions.php:583
Open
xoops_module_write_admin_menu(impresscms_get_adminmenu());
- Exclude checks
Variable $menu
was undeclared, but array fields are being added to it. Open
$menu[0] = array('link' => ICMS_URL . '/admin.php', 'title' => _CPHOME, 'absolute' => 1, 'small' => ICMS_URL . '/modules/system/images/mini_cp.png');
- Exclude checks
Reference to undeclared constant \_YOURHOME
Open
$menu[] = array('link' => ICMS_URL, 'title' => _YOURHOME, 'absolute' => 1, 'small' => ICMS_URL . '/modules/system/images/home.png');
- Exclude checks
Returning type false
but xoops_module_write_admin_menu()
is declared to return true
Open
return false;
- Exclude checks
Reference to undeclared constant \_CHARSET
Open
header('Content-Type:text/html; charset=' . _CHARSET);
- Exclude checks
Call to method handler
from undeclared class \icms
Open
$moduleperm_handler = icms::handler('icms_member_groupperm');
- Exclude checks
Call to method handler
from undeclared class \icms
Open
$sysperm_handler = icms::handler('icms_member_groupperm');
- Exclude checks
Reference to static property module
from undeclared class \icms
Open
$icmsAdminTpl->assign('modid', icms::$module->getVar('mid'));
- Exclude checks
Reference to undeclared constant \_MODULES
(Did you mean $modules) Open
$admin_menu[] = array('id' => 'modules', 'text' => _MODULES, 'link' => ICMS_URL . '/modules/system/admin.php?fct=modulesadmin', 'menu' => $modules_menu);
- Exclude checks
Reference to undeclared constant \_IMPRESSCMS_HOME
Open
$menu[] = array('link' => 'http://www.impresscms.org', 'title' => _IMPRESSCMS_HOME, 'absolute' => 1 // small' => ICMS_URL . '/images/impresscms.png',
- Exclude checks
Reference to static property user
from undeclared class \icms
Open
icms::$user->getGroups()
- Exclude checks
Variable $reversed_module_admin_menu
was undeclared, but array fields are being added to it. Open
$reversed_module_admin_menu[] = $m['subs'][$i];
- Exclude checks
Reference to undeclared constant \_CPHOME
Open
$menu[0] = array('link' => ICMS_URL . '/admin.php', 'title' => _CPHOME, 'absolute' => 1, 'small' => ICMS_URL . '/modules/system/images/mini_cp.png');
- Exclude checks
Call to method handler
from undeclared class \icms
Open
$module_handler = icms::handler('icms_module');
- Exclude checks
Call to method __construct
from undeclared class \icms_db_criteria_Item
Open
$criteria->add(new icms_db_criteria_Item('isactive', 1));
- Exclude checks
Call to method add
from undeclared class \icms_db_criteria_Compo
Open
$criteria->add(new icms_db_criteria_Item('isactive', 1));
- Exclude checks
Reference to undeclared constant \_IMPRESSCMS_COMMUNITY
Open
$menu[] = array('link' => 'https://www.impresscms.org/modules/iforum/', 'title' => _IMPRESSCMS_COMMUNITY, 'absolute' => 1 // 'small' = ICMS_URL . '/images/impresscms.png',
- Exclude checks
Reference to undeclared constant \_IMPRESSCMS_PROJECT
Open
$menu[] = array('link' => 'https://github.com/ImpressCMS/impresscms', 'title' => _IMPRESSCMS_PROJECT, 'absolute' => 1 // 'small' = ICMS_URL . '/images/impresscms.png',
- Exclude checks
Call to method assign
from undeclared class \icms_view_Tpl
Open
$icmsAdminTpl->assign('xoops_url', ICMS_URL);
- Exclude checks
Reference to undeclared constant \_PREFERENCES
Open
$icmsAdminTpl->assign('lang_prefs', _PREFERENCES);
- Exclude checks
Reference to undeclared constant \_IMPRESSCMS_WIKI
Open
$menu[] = array('link' => 'https://www.impresscms.org/modules/simplywiki/', 'title' => _IMPRESSCMS_WIKI, 'absolute' => 1 // 'small' = ICMS_URL . '/images/impresscms.png',
- Exclude checks
Call to method __construct
from undeclared class \icms_view_theme_Factory
Open
$xoopsThemeFactory = new icms_view_theme_Factory();
- Exclude checks
Reference to static property module
from undeclared class \icms
Open
if ($mod['dir'] == icms::$module->getVar('dirname')) {
- Exclude checks
Reference to static property module
from undeclared class \icms
Open
$icmsAdminTpl->assign('modname', icms::$module->getVar('name'));
- Exclude checks
Reference to static property logger
from undeclared class \icms
Open
icms::$logger->stopTime();
- Exclude checks
Reference to undeclared constant \_IMPRESSCMS_ADDONS
Open
$menu[] = array('link' => 'https://www.impresscms.org/modules/downloads/', 'title' => _IMPRESSCMS_ADDONS, 'absolute' => 1 // 'small' => ICMS_URL . '/images/impresscms.png',
- Exclude checks
Reference to undeclared constant \_IMPRESSCMS_LOCAL_SUPPORT
Open
$menu[] = array('link' => _IMPRESSCMS_LOCAL_SUPPORT, 'title' => _IMPRESSCMS_LOCAL_SUPPORT_TITLE, 'absolute' => 1 // 'small' => ICMS_URL . '/images/impresscms.png',
- Exclude checks
Argument 2 (haystack)
is null
but \in_array()
takes array
Open
if ($all_ok == false && !in_array($subitem['id'], $ok_syscats)) {
- Exclude checks
Reference to undeclared constant \_PREFERENCES
Open
$icmsAdminTpl->assign('lang_prefs', _PREFERENCES);
- Exclude checks
Reference to static property logger
from undeclared class \icms
Open
icms::$logger->stopTime('XOOPS output init');
- Exclude checks
Call to method __construct
from undeclared class \icms_db_criteria_Compo
Open
$criteria = new icms_db_criteria_Compo();
- Exclude checks
Reference to undeclared constant \_IMPRESSCMS_NEWS
Open
$menu[] = array('link' => ICMS_URL . '/admin.php?rssnews=1', 'title' => _IMPRESSCMS_NEWS, 'absolute' => 1 // 'small' => ICMS_URL . '/images/impresscms.png',
- Exclude checks
Variable $column
was undeclared, but array fields are being added to it. Open
$column[] = $sortarray['title'];
- Exclude checks
Reference to undeclared constant \_LOGOUT
Open
$menu[] = array('link' => ICMS_URL . '/user.php?op=logout', 'title' => _LOGOUT, 'absolute' => 1, 'small' => ICMS_URL . '/modules/system/images/logout.png');
- Exclude checks
Reference to undeclared constant \_CPHOME
Open
$admin_menu[0] = array('id' => 'cphome', 'text' => _CPHOME, 'link' => '#', 'menu' => $menu);
- Exclude checks
Reference to undeclared constant \_IMPRESSCMS_BLOG
Open
$menu[] = array('link' => 'https://www.impresscms.org/modules/news/', 'title' => _IMPRESSCMS_BLOG, 'absolute' => 1 // 'small'] = ICMS_URL . '/images/impresscms.png',
- Exclude checks
Returning type false
but xoops_module_write_admin_menu()
is declared to return true
Open
return false;
- Exclude checks
Call to method assign
from undeclared class \icms_view_Tpl
Open
$icmsAdminTpl->assign('icms_sitename', $icmsConfig['sitename']);
- Exclude checks
Reference to static property user
from undeclared class \icms
Open
$groups = icms::$user->getGroups();
- Exclude checks
Call to method handler
from undeclared class \icms
Open
$module_handler = icms::handler('icms_module');
- Exclude checks
Reference to static property module
from undeclared class \icms
Open
if (icms::$module->getVar('dirname') == 'system') {
- Exclude checks
Reference to static property logger
from undeclared class \icms
Open
icms::$logger->stopTime('Module display');
- Exclude checks
Reference to static property logger
from undeclared class \icms
Open
icms::$logger->startTime('Module display');
- Exclude checks
Call to method __construct
from undeclared class \icms_db_criteria_Item
Open
$criteria->add(new icms_db_criteria_Item('hasadmin', 1));
- Exclude checks
Reference to undeclared constant \_PREFERENCES
Open
$subs = array('title' => _PREFERENCES, 'link' => ICMS_URL . '/modules/system/admin.php?fct=preferences&op=showmod&mod=' . $module->getVar('mid'));
- Exclude checks
Reference to undeclared constant \_IMPRESSCMS_LOCAL_SUPPORT_TITLE
Open
$menu[] = array('link' => _IMPRESSCMS_LOCAL_SUPPORT, 'title' => _IMPRESSCMS_LOCAL_SUPPORT_TITLE, 'absolute' => 1 // 'small' => ICMS_URL . '/images/impresscms.png',
- Exclude checks
Reference to undeclared constant \_SYSTEM
Open
$admin_menu[] = array('id' => 'opsystem', 'text' => _SYSTEM, 'link' => ICMS_URL . '/modules/system/admin.php', 'menu' => $menu);
- Exclude checks
Similar blocks of code found in 2 locations. Consider refactoring. Open
if (!empty($icmsConfigPlugins['sanitizer_plugins'])) {
foreach ($icmsConfigPlugins['sanitizer_plugins'] as $key) {
if (empty($key)) continue;
if (file_exists(ICMS_ROOT_PATH . '/plugins/textsanitizer/' . $key . '/' . $key . '.css')) {
$xoTheme->addStylesheet(ICMS_URL . '/plugins/textsanitizer/' . $key . '/' . $key . '.css', array('media' => 'screen'));
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 251.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 2 locations. Consider refactoring. Open
if (isset($xoopsOption['template_main']) && $xoopsOption['template_main'] != $xoTheme->contentTemplate) {
trigger_error("xoopsOption[template_main] should be defined before including header.php", E_USER_WARNING);
if (false === strpos($xoopsOption['template_main'], ':')) {
$xoTheme->contentTemplate = 'db:' . $xoopsOption['template_main'];
} else {
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 100.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Avoid excessively long variable names like $reversed_module_admin_menu. Keep variable name length under 20. Open
$reversed_module_admin_menu[] = $m['subs'][$i];
- Read upRead up
- Exclude checks
LongVariable
Since: 0.2
Detects when a field, formal or local variable is declared with a long name.
Example
class Something {
protected $reallyLongIntName = -3; // VIOLATION - Field
public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
$otherReallyLongName = -5; // VIOLATION - Local
for ($interestingIntIndex = 0; // VIOLATION - For
$interestingIntIndex < 10;
$interestingIntIndex++ ) {
}
}
}
Source https://phpmd.org/rules/naming.html#longvariable
Avoid variables with short names like $b. Configured minimum length is 3. Open
function impresscms_sort_adminmenu_modules($a, $b) {
- Read upRead up
- Exclude checks
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
Avoid variables with short names like $a. Configured minimum length is 3. Open
function impresscms_sort_adminmenu_modules($a, $b) {
- Read upRead up
- Exclude checks
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
Avoid variables with short names like $m. Configured minimum length is 3. Open
$m = $mod; // Getting info of the current module
- Read upRead up
- Exclude checks
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
TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE" Open
if (fwrite($file, var_export($content, true)) == FALSE) {
- Exclude checks
Inline control structures are not allowed Open
if (empty($key)) continue;
- Exclude checks
Inline control structures are not allowed Open
if ($rtn['hassubs'] == 0) unset($rtn['subs']);
- Exclude checks
Inline control structures are not allowed Open
if (count($item['subs']) > 0) $perm_itens[] = $item;
- Exclude checks
Inline control structures are not allowed Open
if (isset($icmsConfig['theme_admin_set'])) $xoopsThemeFactory->defaultTheme = $icmsConfig['theme_admin_set'];
- Exclude checks
The variable $reversed_module_admin_menu is not named in camelCase. Open
function icms_cp_header() {
global $icmsConfig, $icmsConfigPlugins, $icmsConfigPersona, $xoopsModule, $xoopsTpl, $xoopsOption, $icmsTheme, $xoTheme, $icmsConfigMultilang, $icmsAdminTpl;
icms::$logger->stopTime('Module init');
icms::$logger->startTime('ImpressCMS CP Output Init');
- Read upRead up
- Exclude checks
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 $style_info is not named in camelCase. Open
function icms_cp_header() {
global $icmsConfig, $icmsConfigPlugins, $icmsConfigPersona, $xoopsModule, $xoopsTpl, $xoopsOption, $icmsTheme, $xoTheme, $icmsConfigMultilang, $icmsAdminTpl;
icms::$logger->stopTime('Module init');
icms::$logger->startTime('ImpressCMS CP Output Init');
- Read upRead up
- Exclude checks
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 $all_ok is not named in camelCase. Open
function icms_cp_header() {
global $icmsConfig, $icmsConfigPlugins, $icmsConfigPersona, $xoopsModule, $xoopsTpl, $xoopsOption, $icmsTheme, $xoTheme, $icmsConfigMultilang, $icmsAdminTpl;
icms::$logger->stopTime('Module init');
icms::$logger->startTime('ImpressCMS CP Output Init');
- Read upRead up
- Exclude checks
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 $style_info is not named in camelCase. Open
function icms_cp_header() {
global $icmsConfig, $icmsConfigPlugins, $icmsConfigPersona, $xoopsModule, $xoopsTpl, $xoopsOption, $icmsTheme, $xoTheme, $icmsConfigMultilang, $icmsAdminTpl;
icms::$logger->stopTime('Module init');
icms::$logger->startTime('ImpressCMS CP Output Init');
- Read upRead up
- Exclude checks
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 $sysprefs_tmp is not named in camelCase. Open
function icms_cp_header() {
global $icmsConfig, $icmsConfigPlugins, $icmsConfigPersona, $xoopsModule, $xoopsTpl, $xoopsOption, $icmsTheme, $xoTheme, $icmsConfigMultilang, $icmsAdminTpl;
icms::$logger->stopTime('Module init');
icms::$logger->startTime('ImpressCMS CP Output Init');
- Read upRead up
- Exclude checks
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 $perm_itens is not named in camelCase. Open
function icms_cp_header() {
global $icmsConfig, $icmsConfigPlugins, $icmsConfigPersona, $xoopsModule, $xoopsTpl, $xoopsOption, $icmsTheme, $xoTheme, $icmsConfigMultilang, $icmsAdminTpl;
icms::$logger->stopTime('Module init');
icms::$logger->startTime('ImpressCMS CP Output Init');
- Read upRead up
- Exclude checks
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 $admin_menu is not named in camelCase. Open
function icms_cp_header() {
global $icmsConfig, $icmsConfigPlugins, $icmsConfigPersona, $xoopsModule, $xoopsTpl, $xoopsOption, $icmsTheme, $xoTheme, $icmsConfigMultilang, $icmsAdminTpl;
icms::$logger->stopTime('Module init');
icms::$logger->startTime('ImpressCMS CP Output Init');
- Read upRead up
- Exclude checks
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 $sysperm_handler is not named in camelCase. Open
function icms_cp_header() {
global $icmsConfig, $icmsConfigPlugins, $icmsConfigPersona, $xoopsModule, $xoopsTpl, $xoopsOption, $icmsTheme, $xoTheme, $icmsConfigMultilang, $icmsAdminTpl;
icms::$logger->stopTime('Module init');
icms::$logger->startTime('ImpressCMS CP Output Init');
- Read upRead up
- Exclude checks
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 $admin_perm is not named in camelCase. Open
function icms_cp_header() {
global $icmsConfig, $icmsConfigPlugins, $icmsConfigPersona, $xoopsModule, $xoopsTpl, $xoopsOption, $icmsTheme, $xoTheme, $icmsConfigMultilang, $icmsAdminTpl;
icms::$logger->stopTime('Module init');
icms::$logger->startTime('ImpressCMS CP Output Init');
- Read upRead up
- Exclude checks
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 $ok_syscats is not named in camelCase. Open
function icms_cp_header() {
global $icmsConfig, $icmsConfigPlugins, $icmsConfigPersona, $xoopsModule, $xoopsTpl, $xoopsOption, $icmsTheme, $xoTheme, $icmsConfigMultilang, $icmsAdminTpl;
icms::$logger->stopTime('Module init');
icms::$logger->startTime('ImpressCMS CP Output Init');
- Read upRead up
- Exclude checks
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 $style_info is not named in camelCase. Open
function icms_cp_header() {
global $icmsConfig, $icmsConfigPlugins, $icmsConfigPersona, $xoopsModule, $xoopsTpl, $xoopsOption, $icmsTheme, $xoTheme, $icmsConfigMultilang, $icmsAdminTpl;
icms::$logger->stopTime('Module init');
icms::$logger->startTime('ImpressCMS CP Output Init');
- Read upRead up
- Exclude checks
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 $perm_itens is not named in camelCase. Open
function icms_cp_header() {
global $icmsConfig, $icmsConfigPlugins, $icmsConfigPersona, $xoopsModule, $xoopsTpl, $xoopsOption, $icmsTheme, $xoTheme, $icmsConfigMultilang, $icmsAdminTpl;
icms::$logger->stopTime('Module init');
icms::$logger->startTime('ImpressCMS CP Output Init');
- Read upRead up
- Exclude checks
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 $admin_perm is not named in camelCase. Open
function icms_cp_header() {
global $icmsConfig, $icmsConfigPlugins, $icmsConfigPersona, $xoopsModule, $xoopsTpl, $xoopsOption, $icmsTheme, $xoTheme, $icmsConfigMultilang, $icmsAdminTpl;
icms::$logger->stopTime('Module init');
icms::$logger->startTime('ImpressCMS CP Output Init');
- Read upRead up
- Exclude checks
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 $perm_itens is not named in camelCase. Open
function icms_cp_header() {
global $icmsConfig, $icmsConfigPlugins, $icmsConfigPersona, $xoopsModule, $xoopsTpl, $xoopsOption, $icmsTheme, $xoTheme, $icmsConfigMultilang, $icmsAdminTpl;
icms::$logger->stopTime('Module init');
icms::$logger->startTime('ImpressCMS CP Output Init');
- Read upRead up
- Exclude checks
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 $reversed_sysprefs is not named in camelCase. Open
function icms_cp_header() {
global $icmsConfig, $icmsConfigPlugins, $icmsConfigPersona, $xoopsModule, $xoopsTpl, $xoopsOption, $icmsTheme, $xoTheme, $icmsConfigMultilang, $icmsAdminTpl;
icms::$logger->stopTime('Module init');
icms::$logger->startTime('ImpressCMS CP Output Init');
- Read upRead up
- Exclude checks
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 $style_info is not named in camelCase. Open
function icms_cp_header() {
global $icmsConfig, $icmsConfigPlugins, $icmsConfigPersona, $xoopsModule, $xoopsTpl, $xoopsOption, $icmsTheme, $xoTheme, $icmsConfigMultilang, $icmsAdminTpl;
icms::$logger->stopTime('Module init');
icms::$logger->startTime('ImpressCMS CP Output Init');
- Read upRead up
- Exclude checks
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 $moduleperm_handler is not named in camelCase. Open
function icms_cp_header() {
global $icmsConfig, $icmsConfigPlugins, $icmsConfigPersona, $xoopsModule, $xoopsTpl, $xoopsOption, $icmsTheme, $xoTheme, $icmsConfigMultilang, $icmsAdminTpl;
icms::$logger->stopTime('Module init');
icms::$logger->startTime('ImpressCMS CP Output Init');
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $module_handler is not named in camelCase. Open
function icms_cp_header() {
global $icmsConfig, $icmsConfigPlugins, $icmsConfigPersona, $xoopsModule, $xoopsTpl, $xoopsOption, $icmsTheme, $xoTheme, $icmsConfigMultilang, $icmsAdminTpl;
icms::$logger->stopTime('Module init');
icms::$logger->startTime('ImpressCMS CP Output Init');
- Read upRead up
- Exclude checks
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 $ok_syscats is not named in camelCase. Open
function icms_cp_header() {
global $icmsConfig, $icmsConfigPlugins, $icmsConfigPersona, $xoopsModule, $xoopsTpl, $xoopsOption, $icmsTheme, $xoTheme, $icmsConfigMultilang, $icmsAdminTpl;
icms::$logger->stopTime('Module init');
icms::$logger->startTime('ImpressCMS CP Output Init');
- Read upRead up
- Exclude checks
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 $style_info is not named in camelCase. Open
function icms_cp_header() {
global $icmsConfig, $icmsConfigPlugins, $icmsConfigPersona, $xoopsModule, $xoopsTpl, $xoopsOption, $icmsTheme, $xoTheme, $icmsConfigMultilang, $icmsAdminTpl;
icms::$logger->stopTime('Module init');
icms::$logger->startTime('ImpressCMS CP Output Init');
- Read upRead up
- Exclude checks
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 $admin_menu is not named in camelCase. Open
function icms_cp_header() {
global $icmsConfig, $icmsConfigPlugins, $icmsConfigPersona, $xoopsModule, $xoopsTpl, $xoopsOption, $icmsTheme, $xoTheme, $icmsConfigMultilang, $icmsAdminTpl;
icms::$logger->stopTime('Module init');
icms::$logger->startTime('ImpressCMS CP Output Init');
- Read upRead up
- Exclude checks
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 $perm_itens is not named in camelCase. Open
function icms_cp_header() {
global $icmsConfig, $icmsConfigPlugins, $icmsConfigPersona, $xoopsModule, $xoopsTpl, $xoopsOption, $icmsTheme, $xoTheme, $icmsConfigMultilang, $icmsAdminTpl;
icms::$logger->stopTime('Module init');
icms::$logger->startTime('ImpressCMS CP Output Init');
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $module_handler is not named in camelCase. Open
function icms_cp_header() {
global $icmsConfig, $icmsConfigPlugins, $icmsConfigPersona, $xoopsModule, $xoopsTpl, $xoopsOption, $icmsTheme, $xoTheme, $icmsConfigMultilang, $icmsAdminTpl;
icms::$logger->stopTime('Module init');
icms::$logger->startTime('ImpressCMS CP Output Init');
- Read upRead up
- Exclude checks
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 $moduleperm_handler is not named in camelCase. Open
function icms_cp_header() {
global $icmsConfig, $icmsConfigPlugins, $icmsConfigPersona, $xoopsModule, $xoopsTpl, $xoopsOption, $icmsTheme, $xoTheme, $icmsConfigMultilang, $icmsAdminTpl;
icms::$logger->stopTime('Module init');
icms::$logger->startTime('ImpressCMS CP Output Init');
- Read upRead up
- Exclude checks
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 $admin_menu is not named in camelCase. Open
function impresscms_get_adminmenu() {
$admin_menu = array();
$modules_menu = array();
$systemadm = false;
- Read upRead up
- Exclude checks
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 $style_info is not named in camelCase. Open
function icms_cp_header() {
global $icmsConfig, $icmsConfigPlugins, $icmsConfigPersona, $xoopsModule, $xoopsTpl, $xoopsOption, $icmsTheme, $xoTheme, $icmsConfigMultilang, $icmsAdminTpl;
icms::$logger->stopTime('Module init');
icms::$logger->startTime('ImpressCMS CP Output Init');
- Read upRead up
- Exclude checks
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 $reversed_sysprefs is not named in camelCase. Open
function icms_cp_header() {
global $icmsConfig, $icmsConfigPlugins, $icmsConfigPersona, $xoopsModule, $xoopsTpl, $xoopsOption, $icmsTheme, $xoTheme, $icmsConfigMultilang, $icmsAdminTpl;
icms::$logger->stopTime('Module init');
icms::$logger->startTime('ImpressCMS CP Output Init');
- Read upRead up
- Exclude checks
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 $perm_itens is not named in camelCase. Open
function icms_cp_header() {
global $icmsConfig, $icmsConfigPlugins, $icmsConfigPersona, $xoopsModule, $xoopsTpl, $xoopsOption, $icmsTheme, $xoTheme, $icmsConfigMultilang, $icmsAdminTpl;
icms::$logger->stopTime('Module init');
icms::$logger->startTime('ImpressCMS CP Output Init');
- Read upRead up
- Exclude checks
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 $all_ok is not named in camelCase. Open
function icms_cp_header() {
global $icmsConfig, $icmsConfigPlugins, $icmsConfigPersona, $xoopsModule, $xoopsTpl, $xoopsOption, $icmsTheme, $xoTheme, $icmsConfigMultilang, $icmsAdminTpl;
icms::$logger->stopTime('Module init');
icms::$logger->startTime('ImpressCMS CP Output Init');
- Read upRead up
- Exclude checks
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 $admin_menu is not named in camelCase. Open
function impresscms_get_adminmenu() {
$admin_menu = array();
$modules_menu = array();
$systemadm = false;
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $module_handler is not named in camelCase. Open
function impresscms_get_adminmenu() {
$admin_menu = array();
$modules_menu = array();
$systemadm = false;
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $module_handler is not named in camelCase. Open
function impresscms_get_adminmenu() {
$admin_menu = array();
$modules_menu = array();
$systemadm = false;
- Read upRead up
- Exclude checks
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 $modules_menu is not named in camelCase. Open
function impresscms_get_adminmenu() {
$admin_menu = array();
$modules_menu = array();
$systemadm = false;
- Read upRead up
- Exclude checks
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 $admin_menu is not named in camelCase. Open
function impresscms_get_adminmenu() {
$admin_menu = array();
$modules_menu = array();
$systemadm = false;
- Read upRead up
- Exclude checks
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 $modules_menu is not named in camelCase. Open
function impresscms_get_adminmenu() {
$admin_menu = array();
$modules_menu = array();
$systemadm = false;
- Read upRead up
- Exclude checks
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 $perm_itens is not named in camelCase. Open
function icms_cp_header() {
global $icmsConfig, $icmsConfigPlugins, $icmsConfigPersona, $xoopsModule, $xoopsTpl, $xoopsOption, $icmsTheme, $xoTheme, $icmsConfigMultilang, $icmsAdminTpl;
icms::$logger->stopTime('Module init');
icms::$logger->startTime('ImpressCMS CP Output Init');
- Read upRead up
- Exclude checks
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 $sysprefs_tmp is not named in camelCase. Open
function icms_cp_header() {
global $icmsConfig, $icmsConfigPlugins, $icmsConfigPersona, $xoopsModule, $xoopsTpl, $xoopsOption, $icmsTheme, $xoTheme, $icmsConfigMultilang, $icmsAdminTpl;
icms::$logger->stopTime('Module init');
icms::$logger->startTime('ImpressCMS CP Output Init');
- Read upRead up
- Exclude checks
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 $sysperm_handler is not named in camelCase. Open
function icms_cp_header() {
global $icmsConfig, $icmsConfigPlugins, $icmsConfigPersona, $xoopsModule, $xoopsTpl, $xoopsOption, $icmsTheme, $xoTheme, $icmsConfigMultilang, $icmsAdminTpl;
icms::$logger->stopTime('Module init');
icms::$logger->startTime('ImpressCMS CP Output Init');
- Read upRead up
- Exclude checks
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 $admin_menu is not named in camelCase. Open
function impresscms_get_adminmenu() {
$admin_menu = array();
$modules_menu = array();
$systemadm = false;
- Read upRead up
- Exclude checks
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 $sysprefs_tmp is not named in camelCase. Open
function icms_cp_header() {
global $icmsConfig, $icmsConfigPlugins, $icmsConfigPersona, $xoopsModule, $xoopsTpl, $xoopsOption, $icmsTheme, $xoTheme, $icmsConfigMultilang, $icmsAdminTpl;
icms::$logger->stopTime('Module init');
icms::$logger->startTime('ImpressCMS CP Output Init');
- Read upRead up
- Exclude checks
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 $sysprefs_tmp is not named in camelCase. Open
function icms_cp_header() {
global $icmsConfig, $icmsConfigPlugins, $icmsConfigPersona, $xoopsModule, $xoopsTpl, $xoopsOption, $icmsTheme, $xoTheme, $icmsConfigMultilang, $icmsAdminTpl;
icms::$logger->stopTime('Module init');
icms::$logger->startTime('ImpressCMS CP Output Init');
- Read upRead up
- Exclude checks
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 $all_ok is not named in camelCase. Open
function icms_cp_header() {
global $icmsConfig, $icmsConfigPlugins, $icmsConfigPersona, $xoopsModule, $xoopsTpl, $xoopsOption, $icmsTheme, $xoTheme, $icmsConfigMultilang, $icmsAdminTpl;
icms::$logger->stopTime('Module init');
icms::$logger->startTime('ImpressCMS CP Output Init');
- Read upRead up
- Exclude checks
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 $reversed_module_admin_menu is not named in camelCase. Open
function icms_cp_header() {
global $icmsConfig, $icmsConfigPlugins, $icmsConfigPersona, $xoopsModule, $xoopsTpl, $xoopsOption, $icmsTheme, $xoTheme, $icmsConfigMultilang, $icmsAdminTpl;
icms::$logger->stopTime('Module init');
icms::$logger->startTime('ImpressCMS CP Output Init');
- Read upRead up
- Exclude checks
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 $sysprefs_tmp is not named in camelCase. Open
function icms_cp_header() {
global $icmsConfig, $icmsConfigPlugins, $icmsConfigPersona, $xoopsModule, $xoopsTpl, $xoopsOption, $icmsTheme, $xoTheme, $icmsConfigMultilang, $icmsAdminTpl;
icms::$logger->stopTime('Module init');
icms::$logger->startTime('ImpressCMS CP Output Init');
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $module_handler is not named in camelCase. Open
function impresscms_get_adminmenu() {
$admin_menu = array();
$modules_menu = array();
$systemadm = false;
- Read upRead up
- Exclude checks
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 $modules_menu is not named in camelCase. Open
function impresscms_get_adminmenu() {
$admin_menu = array();
$modules_menu = array();
$systemadm = false;
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $module_handler is not named in camelCase. Open
function impresscms_get_adminmenu() {
$admin_menu = array();
$modules_menu = array();
$systemadm = false;
- Read upRead up
- Exclude checks
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 $admin_menu is not named in camelCase. Open
function impresscms_get_adminmenu() {
$admin_menu = array();
$modules_menu = array();
$systemadm = false;
- Read upRead up
- Exclude checks
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 $admin_menu is not named in camelCase. Open
function impresscms_get_adminmenu() {
$admin_menu = array();
$modules_menu = array();
$systemadm = false;
- Read upRead up
- Exclude checks
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();
}
}