readPost accesses the super-global variable $_POST. Open
function readPost() {
if (isset($_POST['database']))
$this->database = $this->sanitizer->stripSlashesGPC($_POST['database']);
if (isset($_POST['dbhost']))
$this->dbhost = $this->sanitizer->stripSlashesGPC($_POST['dbhost']);
- 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
__construct accesses the super-global variable $_SERVER. Open
function __construct($post=false) {
$this->sanitizer =& icms_core_Textsanitizer::getInstance();
if ($post) {
$this->readPost();
- 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
readPost accesses the super-global variable $_POST. Open
function readPost() {
if (isset($_POST['database']))
$this->database = $this->sanitizer->stripSlashesGPC($_POST['database']);
if (isset($_POST['dbhost']))
$this->dbhost = $this->sanitizer->stripSlashesGPC($_POST['dbhost']);
- 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
readPost accesses the super-global variable $_POST. Open
function readPost() {
if (isset($_POST['database']))
$this->database = $this->sanitizer->stripSlashesGPC($_POST['database']);
if (isset($_POST['dbhost']))
$this->dbhost = $this->sanitizer->stripSlashesGPC($_POST['dbhost']);
- 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
readPost accesses the super-global variable $_POST. Open
function readPost() {
if (isset($_POST['database']))
$this->database = $this->sanitizer->stripSlashesGPC($_POST['database']);
if (isset($_POST['dbhost']))
$this->dbhost = $this->sanitizer->stripSlashesGPC($_POST['dbhost']);
- 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
readPost accesses the super-global variable $_POST. Open
function readPost() {
if (isset($_POST['database']))
$this->database = $this->sanitizer->stripSlashesGPC($_POST['database']);
if (isset($_POST['dbhost']))
$this->dbhost = $this->sanitizer->stripSlashesGPC($_POST['dbhost']);
- 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
__construct accesses the super-global variable $_SERVER. Open
function __construct($post=false) {
$this->sanitizer =& icms_core_Textsanitizer::getInstance();
if ($post) {
$this->readPost();
- 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
__construct accesses the super-global variable $_SERVER. Open
function __construct($post=false) {
$this->sanitizer =& icms_core_Textsanitizer::getInstance();
if ($post) {
$this->readPost();
- 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
__construct accesses the super-global variable $_SERVER. Open
function __construct($post=false) {
$this->sanitizer =& icms_core_Textsanitizer::getInstance();
if ($post) {
$this->readPost();
- 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
readPost accesses the super-global variable $_POST. Open
function readPost() {
if (isset($_POST['database']))
$this->database = $this->sanitizer->stripSlashesGPC($_POST['database']);
if (isset($_POST['dbhost']))
$this->dbhost = $this->sanitizer->stripSlashesGPC($_POST['dbhost']);
- 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
readPost accesses the super-global variable $_POST. Open
function readPost() {
if (isset($_POST['database']))
$this->database = $this->sanitizer->stripSlashesGPC($_POST['database']);
if (isset($_POST['dbhost']))
$this->dbhost = $this->sanitizer->stripSlashesGPC($_POST['dbhost']);
- 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
readPost accesses the super-global variable $_POST. Open
function readPost() {
if (isset($_POST['database']))
$this->database = $this->sanitizer->stripSlashesGPC($_POST['database']);
if (isset($_POST['dbhost']))
$this->dbhost = $this->sanitizer->stripSlashesGPC($_POST['dbhost']);
- 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
readPost accesses the super-global variable $_POST. Open
function readPost() {
if (isset($_POST['database']))
$this->database = $this->sanitizer->stripSlashesGPC($_POST['database']);
if (isset($_POST['dbhost']))
$this->dbhost = $this->sanitizer->stripSlashesGPC($_POST['dbhost']);
- 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
readPost accesses the super-global variable $_POST. Open
function readPost() {
if (isset($_POST['database']))
$this->database = $this->sanitizer->stripSlashesGPC($_POST['database']);
if (isset($_POST['dbhost']))
$this->dbhost = $this->sanitizer->stripSlashesGPC($_POST['dbhost']);
- 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
readPost accesses the super-global variable $_POST. Open
function readPost() {
if (isset($_POST['database']))
$this->database = $this->sanitizer->stripSlashesGPC($_POST['database']);
if (isset($_POST['dbhost']))
$this->dbhost = $this->sanitizer->stripSlashesGPC($_POST['dbhost']);
- 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
readPost accesses the super-global variable $_POST. Open
function readPost() {
if (isset($_POST['database']))
$this->database = $this->sanitizer->stripSlashesGPC($_POST['database']);
if (isset($_POST['dbhost']))
$this->dbhost = $this->sanitizer->stripSlashesGPC($_POST['dbhost']);
- 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
readPost accesses the super-global variable $_POST. Open
function readPost() {
if (isset($_POST['database']))
$this->database = $this->sanitizer->stripSlashesGPC($_POST['database']);
if (isset($_POST['dbhost']))
$this->dbhost = $this->sanitizer->stripSlashesGPC($_POST['dbhost']);
- 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
readPost accesses the super-global variable $_POST. Open
function readPost() {
if (isset($_POST['database']))
$this->database = $this->sanitizer->stripSlashesGPC($_POST['database']);
if (isset($_POST['dbhost']))
$this->dbhost = $this->sanitizer->stripSlashesGPC($_POST['dbhost']);
- 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
__construct accesses the super-global variable $_SERVER. Open
function __construct($post=false) {
$this->sanitizer =& icms_core_Textsanitizer::getInstance();
if ($post) {
$this->readPost();
- 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
readPost accesses the super-global variable $_POST. Open
function readPost() {
if (isset($_POST['database']))
$this->database = $this->sanitizer->stripSlashesGPC($_POST['database']);
if (isset($_POST['dbhost']))
$this->dbhost = $this->sanitizer->stripSlashesGPC($_POST['dbhost']);
- 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
__construct accesses the super-global variable $_SERVER. Open
function __construct($post=false) {
$this->sanitizer =& icms_core_Textsanitizer::getInstance();
if ($post) {
$this->readPost();
- 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
readPost accesses the super-global variable $_POST. Open
function readPost() {
if (isset($_POST['database']))
$this->database = $this->sanitizer->stripSlashesGPC($_POST['database']);
if (isset($_POST['dbhost']))
$this->dbhost = $this->sanitizer->stripSlashesGPC($_POST['dbhost']);
- 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
readPost accesses the super-global variable $_POST. Open
function readPost() {
if (isset($_POST['database']))
$this->database = $this->sanitizer->stripSlashesGPC($_POST['database']);
if (isset($_POST['dbhost']))
$this->dbhost = $this->sanitizer->stripSlashesGPC($_POST['dbhost']);
- 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
__construct accesses the super-global variable $_SERVER. Open
function __construct($post=false) {
$this->sanitizer =& icms_core_Textsanitizer::getInstance();
if ($post) {
$this->readPost();
- 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
readPost accesses the super-global variable $_POST. Open
function readPost() {
if (isset($_POST['database']))
$this->database = $this->sanitizer->stripSlashesGPC($_POST['database']);
if (isset($_POST['dbhost']))
$this->dbhost = $this->sanitizer->stripSlashesGPC($_POST['dbhost']);
- 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
Method confirmForm
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
function confirmForm() {
$yesno = empty($this->db_pconnect) ? _INSTALL_L24 : _INSTALL_L23;
$ret =
"<table border='0' cellpadding='0' cellspacing='0' valign='top' width='90%'><tr><td class='bg2'>
<table width='100%' border='0' cellpadding='4' cellspacing='1'>
Method editform
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
function editform() {
$ret =
"<table width='100%' class='outer' cellspacing='5'>
<tr>
<th colspan='2'></th>
Function readPost
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function readPost() {
if (isset($_POST['database']))
$this->database = $this->sanitizer->stripSlashesGPC($_POST['database']);
if (isset($_POST['dbhost']))
$this->dbhost = $this->sanitizer->stripSlashesGPC($_POST['dbhost']);
- 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 readConstant
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function readConstant() {
if (defined('XOOPS_DB_TYPE'))
$this->database = XOOPS_DB_TYPE;
if (defined('XOOPS_DB_HOST'))
$this->dbhost = XOOPS_DB_HOST;
- 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 checkData
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function checkData() {
$ret = '';
$error = array();
if (empty($this->dbhost)) {
- 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 __construct
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function __construct($post=false) {
$this->sanitizer =& icms_core_Textsanitizer::getInstance();
if ($post) {
$this->readPost();
- 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 method readConstant() has an NPath complexity of 768. The configured NPath complexity threshold is 200. Open
function readConstant() {
if (defined('XOOPS_DB_TYPE'))
$this->database = XOOPS_DB_TYPE;
if (defined('XOOPS_DB_HOST'))
$this->dbhost = XOOPS_DB_HOST;
- 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 method readPost() has an NPath complexity of 768. The configured NPath complexity threshold is 200. Open
function readPost() {
if (isset($_POST['database']))
$this->database = $this->sanitizer->stripSlashesGPC($_POST['database']);
if (isset($_POST['dbhost']))
$this->dbhost = $this->sanitizer->stripSlashesGPC($_POST['dbhost']);
- 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 method readPost() has a Cyclomatic Complexity of 11. The configured cyclomatic complexity threshold is 10. Open
function readPost() {
if (isset($_POST['database']))
$this->database = $this->sanitizer->stripSlashesGPC($_POST['database']);
if (isset($_POST['dbhost']))
$this->dbhost = $this->sanitizer->stripSlashesGPC($_POST['dbhost']);
- 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 method readConstant() has a Cyclomatic Complexity of 11. The configured cyclomatic complexity threshold is 10. Open
function readConstant() {
if (defined('XOOPS_DB_TYPE'))
$this->database = XOOPS_DB_TYPE;
if (defined('XOOPS_DB_HOST'))
$this->dbhost = XOOPS_DB_HOST;
- 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 method __construct has a boolean flag argument $post, which is a certain sign of a Single Responsibility Principle violation. Open
function __construct($post=false) {
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
Avoid using static access to class 'icms_core_Textsanitizer' in method '__construct'. Open
$this->sanitizer =& icms_core_Textsanitizer::getInstance();
- 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 'getDBList'. Open
$list = icms_core_Filesystem::getDirList($dirname);
- 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_Password' in method 'generatePrefix'. Open
return icms_core_Password::createSalt(5);;
- 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 __construct uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$this->database = 'mysql';
$this->dbhost = 'localhost';
$this->db_pconnect = 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
TODO found Open
// TODO: Add any verification of compatibility between the database drivers and the system.
- Exclude checks
Reference to undeclared constant \_INSTALL_L55
Open
$error[] = sprintf(_INSTALL_L57, _INSTALL_L55);
- Exclude checks
Reference to undeclared constant \_INSTALL_L64
Open
$ret .= $this->editform_sub(_INSTALL_L29, _INSTALL_L64, 'dbname', $this->sanitizer->htmlSpecialChars($this->dbname));
- Exclude checks
Reference to undeclared constant \_INSTALL_L29
Open
<td class='bg3'><b>"._INSTALL_L29."</b></td>
- Exclude checks
Reference to undeclared constant \_INSTALL_L57
Open
$error[] = sprintf(_INSTALL_L57, _INSTALL_L55);
- Exclude checks
Reference to undeclared constant \_INSTALL_L52
Open
$ret .= $this->editform_sub(_INSTALL_L52, _INSTALL_L68, 'dbpass', $this->sanitizer->htmlSpecialChars($this->dbpass));
- Exclude checks
Reference to undeclared constant \_INSTALL_L55
Open
$ret .= $this->editform_sub(_INSTALL_L55, _INSTALL_L59, 'root_path', $this->sanitizer->htmlSpecialChars($this->root_path));
- Exclude checks
Reference to undeclared constant \_INSTALL_L69
Open
<span style='font-size:85%;'>"._INSTALL_L69."</span>
- Exclude checks
Reference to undeclared constant \_INSTALL_L58
Open
$ret .= $this->editform_sub(_INSTALL_L56, _INSTALL_L58, 'xoops_url', $this->sanitizer->htmlSpecialChars($this->xoops_url));
- Exclude checks
Reference to undeclared constant \_INSTALL_L55
Open
<td class='bg3'><b>"._INSTALL_L55."</b></td>
- Exclude checks
Reference to undeclared constant \_INSTALL_L66
Open
<span style='font-size:85%;'>"._INSTALL_L66."</span>
- Exclude checks
Reference to undeclared constant \_INSTALL_L59
Open
$ret .= $this->editform_sub(_INSTALL_L55, _INSTALL_L59, 'root_path', $this->sanitizer->htmlSpecialChars($this->root_path));
- Exclude checks
Reference to undeclared constant \_INSTALL_L23
Open
$yesno = empty($this->db_pconnect) ? _INSTALL_L24 : _INSTALL_L23;
- Exclude checks
Reference to undeclared constant \_INSTALL_L57
Open
$error[] = sprintf(_INSTALL_L57, _INSTALL_L56);
- Exclude checks
Call to method getDirList
from undeclared class \icms_core_Filesystem
Open
$list = icms_core_Filesystem::getDirList($dirname);
- Exclude checks
Reference to undeclared constant \_INSTALL_L67
Open
$ret .= $this->editform_sub(_INSTALL_L27, _INSTALL_L67, 'dbhost', $this->sanitizer->htmlSpecialChars($this->dbhost));
- Exclude checks
Reference to undeclared constant \_INSTALL_L28
Open
$ret .= $this->editform_sub(_INSTALL_L28, _INSTALL_L65, 'dbuname', $this->sanitizer->htmlSpecialChars($this->dbuname));
- Exclude checks
Reference to undeclared constant \_INSTALL_L28
Open
<td class='bg3'><b>"._INSTALL_L28."</b></td>
- Exclude checks
Reference to undeclared constant \_INSTALL_L52
Open
<td class='bg3'><b>"._INSTALL_L52."</b></td>
- Exclude checks
Reference to undeclared constant \_INSTALL_L29
Open
$ret .= $this->editform_sub(_INSTALL_L29, _INSTALL_L64, 'dbname', $this->sanitizer->htmlSpecialChars($this->dbname));
- Exclude checks
Reference to undeclared constant \_INSTALL_L30
Open
<td class='bg3'><b>"._INSTALL_L30."</b></td>
- Exclude checks
Reference to undeclared constant \_INSTALL_L68
Open
$ret .= $this->editform_sub(_INSTALL_L52, _INSTALL_L68, 'dbpass', $this->sanitizer->htmlSpecialChars($this->dbpass));
- Exclude checks
Reference to undeclared constant \_INSTALL_L24
Open
<input type='radio' name='db_pconnect' value='0'".($this->db_pconnect != 1 ? " checked='checked'" : "" )." />"._INSTALL_L24."
- Exclude checks
Reference to undeclared constant \_INSTALL_L24
Open
$yesno = empty($this->db_pconnect) ? _INSTALL_L24 : _INSTALL_L23;
- Exclude checks
Reference to undeclared constant \_INSTALL_L29
Open
$error[] = sprintf(_INSTALL_L57, _INSTALL_L29);
- Exclude checks
Reference to undeclared constant \_INSTALL_L56
Open
$error[] = sprintf(_INSTALL_L57, _INSTALL_L56);
- Exclude checks
Reference to undeclared constant \_INSTALL_L56
Open
$ret .= $this->editform_sub(_INSTALL_L56, _INSTALL_L58, 'xoops_url', $this->sanitizer->htmlSpecialChars($this->xoops_url));
- Exclude checks
Reference to undeclared constant \_INSTALL_L51
Open
<b>"._INSTALL_L51."</b><br />
- Exclude checks
Reference to undeclared constant \_INSTALL_L65
Open
$ret .= $this->editform_sub(_INSTALL_L28, _INSTALL_L65, 'dbuname', $this->sanitizer->htmlSpecialChars($this->dbuname));
- Exclude checks
Reference to undeclared constant \_INSTALL_L30
Open
$ret .= $this->editform_sub(_INSTALL_L30, _INSTALL_L63, 'prefix', $this->sanitizer->htmlSpecialChars($this->prefix));
- Exclude checks
Reference to undeclared constant \_INSTALL_L27
Open
<td class='bg3'><b>"._INSTALL_L27."</b></td>
- Exclude checks
Reference to undeclared constant \_INSTALL_L57
Open
$error[] = sprintf(_INSTALL_L57, _INSTALL_L27);
- Exclude checks
Call to method getInstance
from undeclared class \icms_core_Textsanitizer
Open
$this->sanitizer =& icms_core_Textsanitizer::getInstance();
- Exclude checks
Reference to undeclared constant \_INSTALL_L27
Open
$ret .= $this->editform_sub(_INSTALL_L27, _INSTALL_L67, 'dbhost', $this->sanitizer->htmlSpecialChars($this->dbhost));
- Exclude checks
Reference to undeclared constant \_INSTALL_L63
Open
$ret .= $this->editform_sub(_INSTALL_L30, _INSTALL_L63, 'prefix', $this->sanitizer->htmlSpecialChars($this->prefix));
- Exclude checks
Reference to undeclared constant \_INSTALL_L51
Open
<td class='bg3'><b>"._INSTALL_L51."</b></td>
- Exclude checks
Reference to undeclared constant \_INSTALL_L54
Open
<td class='bg3'><b>"._INSTALL_L54."</b></td>
- Exclude checks
Call to method createSalt
from undeclared class \icms_core_Password
Open
return icms_core_Password::createSalt(5);;
- Exclude checks
Reference to undeclared constant \_INSTALL_L27
Open
$error[] = sprintf(_INSTALL_L57, _INSTALL_L27);
- Exclude checks
Reference to undeclared constant \_INSTALL_L57
Open
$error[] = sprintf(_INSTALL_L57, _INSTALL_L30);
- Exclude checks
Reference to undeclared constant \_INSTALL_L23
Open
<input type='radio' name='db_pconnect' value='1'".($this->db_pconnect == 1 ? " checked='checked'" : "" )." />"._INSTALL_L23."
- Exclude checks
Reference to undeclared constant \_INSTALL_L56
Open
<td class='bg3'><b>"._INSTALL_L56."</b></td>
- Exclude checks
Reference to undeclared constant \_INSTALL_L57
Open
$error[] = sprintf(_INSTALL_L57, _INSTALL_L29);
- Exclude checks
Reference to undeclared constant \_INSTALL_L30
Open
$error[] = sprintf(_INSTALL_L57, _INSTALL_L30);
- Exclude checks
Reference to undeclared constant \_INSTALL_L54
Open
<b>"._INSTALL_L54."</b><br />
- Exclude checks
Each class must be in a namespace of at least one level (a top-level vendor name) Open
class setting_manager {
- Exclude checks
The property $db_pconnect is not named in camelCase. Open
class setting_manager {
var $database;
var $dbhost;
var $dbuname;
- Read upRead up
- Exclude checks
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 $xoops_url is not named in camelCase. Open
class setting_manager {
var $database;
var $dbhost;
var $dbuname;
- Read upRead up
- Exclude checks
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 $root_path is not named in camelCase. Open
class setting_manager {
var $database;
var $dbhost;
var $dbuname;
- Read upRead up
- Exclude checks
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 class setting_manager is not named in CamelCase. Open
class setting_manager {
var $database;
var $dbhost;
var $dbuname;
- Read upRead up
- Exclude checks
CamelCaseClassName
Since: 0.2
It is considered best practice to use the CamelCase notation to name classes.
Example
class class_name {
}
Source
Visibility must be declared on method "readConstant" Open
function readConstant() {
- Exclude checks
The var keyword must not be used to declare a property Open
var $dbuname;
- Exclude checks
Visibility must be declared on property "$dbuname" Open
var $dbuname;
- Exclude checks
The var keyword must not be used to declare a property Open
var $root_path;
- Exclude checks
The var keyword must not be used to declare a property Open
var $xoops_url;
- Exclude checks
Each PHP statement must be on a line by itself Open
return icms_core_Password::createSalt(5);;
- Exclude checks
Visibility must be declared on method "checkData" Open
function checkData() {
- Exclude checks
Visibility must be declared on method "getDBList" Open
function getDBList()
- Exclude checks
Visibility must be declared on property "$database" Open
var $database;
- Exclude checks
Visibility must be declared on property "$prefix" Open
var $prefix;
- Exclude checks
Visibility must be declared on method "__construct" Open
function __construct($post=false) {
- Exclude checks
Incorrect spacing between argument "$post" and equals sign; expected 1 but found 0 Open
function __construct($post=false) {
- Exclude checks
Visibility must be declared on method "readPost" Open
function readPost() {
- Exclude checks
Tabs must be used to indent lines; spaces are not allowed Open
"<table width='100%' class='outer' cellspacing='5'>
- Exclude checks
Opening brace should be on the same line as the declaration Open
{
- Exclude checks
The var keyword must not be used to declare a property Open
var $dbhost;
- Exclude checks
Space found after opening bracket of FOREACH loop Open
foreach ( $error as $err) {
- Exclude checks
Visibility must be declared on property "$xoops_url" Open
var $xoops_url;
- Exclude checks
Visibility must be declared on property "$sanitizer" Open
var $sanitizer;
- Exclude checks
Visibility must be declared on property "$dbhost" Open
var $dbhost;
- Exclude checks
The var keyword must not be used to declare a property Open
var $db_pconnect;
- Exclude checks
Incorrect spacing between default value and equals sign for argument "$post"; expected 1 but found 0 Open
function __construct($post=false) {
- Exclude checks
Visibility must be declared on property "$dbpass" Open
var $dbpass;
- Exclude checks
Method name "setting_manager::editform_sub" is not in camel caps format Open
function editform_sub($title, $desc, $name, $value) {
- Exclude checks
Tabs must be used to indent lines; spaces are not allowed Open
"<table border='0' cellpadding='0' cellspacing='0' valign='top' width='90%'><tr><td class='bg2'>
- Exclude checks
The var keyword must not be used to declare a property Open
var $dbname;
- Exclude checks
Visibility must be declared on property "$db_pconnect" Open
var $db_pconnect;
- Exclude checks
Visibility must be declared on property "$root_path" Open
var $root_path;
- Exclude checks
Visibility must be declared on method "editform_sub" Open
function editform_sub($title, $desc, $name, $value) {
- Exclude checks
The var keyword must not be used to declare a property Open
var $dbpass;
- Exclude checks
The var keyword must not be used to declare a property Open
var $prefix;
- Exclude checks
Visibility must be declared on method "editform" Open
function editform() {
- Exclude checks
Visibility must be declared on method "generatePrefix" Open
function generatePrefix() {
- Exclude checks
The var keyword must not be used to declare a property Open
var $database;
- Exclude checks
Visibility must be declared on property "$dbname" Open
var $dbname;
- Exclude checks
The var keyword must not be used to declare a property Open
var $sanitizer;
- Exclude checks
Visibility must be declared on method "confirmForm" Open
function confirmForm() {
- Exclude checks
Inline control structures are not allowed Open
if (isset($_POST['dbhost']))
- Exclude checks
Inline control structures are not allowed Open
if (isset($_POST['dbuname']))
- Exclude checks
Inline control structures are not allowed Open
if (defined('XOOPS_DB_PREFIX'))
- Exclude checks
Inline control structures are not allowed Open
if (defined('XOOPS_URL'))
- Exclude checks
Inline control structures are not allowed Open
if (defined('XOOPS_DB_PASS'))
- Exclude checks
Inline control structures are not allowed Open
if (defined('XOOPS_DB_PCONNECT'))
- Exclude checks
Inline control structures are not allowed Open
if ($val == $this->database) $ret .= " selected='selected'";
- Exclude checks
Inline control structures are not allowed Open
if (defined('XOOPS_ROOT_PATH'))
- Exclude checks
Inline control structures are not allowed Open
if (isset($_POST['xoops_url']))
- Exclude checks
Inline control structures are not allowed Open
if (defined('XOOPS_DB_NAME'))
- Exclude checks
Inline control structures are not allowed Open
if (isset($_POST['root_path']))
- Exclude checks
Inline control structures are not allowed Open
if (defined('XOOPS_DB_TYPE'))
- Exclude checks
Inline control structures are not allowed Open
if (isset($_POST['db_pconnect']))
- Exclude checks
Inline control structures are not allowed Open
if (isset($_POST['dbpass']))
- Exclude checks
Inline control structures are not allowed Open
if (defined('XOOPS_DB_USER'))
- Exclude checks
Inline control structures are not allowed Open
if (isset($_POST['prefix']))
- Exclude checks
Inline control structures are not allowed Open
if (defined('XOOPS_DB_HOST'))
- Exclude checks
Inline control structures are not allowed Open
if (isset($_POST['database']))
- Exclude checks
Inline control structures are not allowed Open
if (isset($_POST['dbname']))
- Exclude checks
No space found after comma in function call Open
$this->root_path = str_replace("\\","/",getcwd()); // "
- Exclude checks
Class name "setting_manager" is not in camel caps format Open
class setting_manager {
- Exclude checks
No space found after comma in function call Open
$filepath = substr($filepath,1);
- Exclude checks
No space found after comma in function call Open
$this->root_path = str_replace("\\","/",getcwd()); // "
- Exclude checks
Expected 0 spaces after opening bracket; 1 found Open
foreach ( $error as $err) {
- Exclude checks
The method editform_sub is not named in camelCase. Open
function editform_sub($title, $desc, $name, $value) {
$inputType = 'text';
return "<tr valign='top' align='left'>
<td class='head'>
<b>".$title."</b><br />
- Read upRead up
- Exclude checks
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
Unexpected spaces found. Open
<td class='even'>
- Exclude checks
Unexpected spaces found. Open
<tr>
- Exclude checks
Unexpected spaces found. Open
<td class='bg1'>".$this->sanitizer->htmlSpecialChars($this->dbuname)."</td>
- Exclude checks
Unexpected spaces found. Open
<tr>
- Exclude checks
Unexpected spaces found. Open
<td class='bg1'>".$this->sanitizer->htmlSpecialChars($this->prefix)."</td>
- Exclude checks
Unexpected spaces found. Open
<tr>
- Exclude checks
Unexpected spaces found. Open
<input type='hidden' name='dbuname' value='".$this->sanitizer->htmlSpecialChars($this->dbuname)."' />
- Exclude checks
Unexpected spaces found. Open
<b>"._INSTALL_L51."</b><br />
- Exclude checks
Unexpected spaces found. Open
<td class='bg1'>".$this->sanitizer->htmlSpecialChars($this->database)."</td>
- Exclude checks
Unexpected spaces found. Open
</tr>
- Exclude checks
Unexpected spaces found. Open
<select size='1' name='database' id='database'>";
- Exclude checks
Unexpected spaces found. Open
";
- Exclude checks
Unexpected spaces found. Open
<b>".$title."</b><br />
- Exclude checks
Unexpected spaces found. Open
</tr>
- Exclude checks
Unexpected spaces found. Open
<td class='bg1'>".$this->sanitizer->htmlSpecialChars($this->dbhost)."</td>
- Exclude checks
Unexpected spaces found. Open
</tr>
- Exclude checks
Unexpected spaces found. Open
</tr>
- Exclude checks
Unexpected spaces found. Open
<td class='bg1'>".$this->sanitizer->htmlSpecialChars($this->dbpass)."</td>
- Exclude checks
Unexpected spaces found. Open
"<table border='0' cellpadding='0' cellspacing='0' valign='top' width='90%'><tr><td class='bg2'>
- Exclude checks
Unexpected spaces found. Open
<td class='bg3'><b>"._INSTALL_L55."</b></td>
- Exclude checks
Unexpected spaces found. Open
<tr>
- Exclude checks
Unexpected spaces found. Open
<td class='bg3'><b>"._INSTALL_L29."</b></td>
- Exclude checks
Unexpected spaces found. Open
</td>
- Exclude checks
Unexpected spaces found. Open
</tr>
- Exclude checks
Unexpected spaces found. Open
<tr>
- Exclude checks
Unexpected spaces found. Open
<span style='font-size:85%;'>"._INSTALL_L66."</span>
- Exclude checks
Unexpected spaces found. Open
</td>
- Exclude checks
Unexpected spaces found. Open
</td>
- Exclude checks
Unexpected spaces found. Open
<input type='radio' name='db_pconnect' value='1'".($this->db_pconnect == 1 ? " checked='checked'" : "" )." />"._INSTALL_L23."
- Exclude checks
Unexpected spaces found. Open
";
- Exclude checks
Unexpected spaces found. Open
<td class='head'>
- Exclude checks
Unexpected spaces found. Open
<tr>
- Exclude checks
Unexpected spaces found. Open
<td class='bg3'><b>"._INSTALL_L30."</b></td>
- Exclude checks
Unexpected spaces found. Open
<input type='hidden' name='dbhost' value='".$this->sanitizer->htmlSpecialChars($this->dbhost)."' />
- Exclude checks
Unexpected spaces found. Open
";
- Exclude checks
Unexpected spaces found. Open
<td class='bg1'>".$this->sanitizer->htmlSpecialChars($this->dbname)."</td>
- Exclude checks
Unexpected spaces found. Open
<tr>
- Exclude checks
Unexpected spaces found. Open
<input type='hidden' name='root_path' value='".$this->sanitizer->htmlSpecialChars($this->root_path)."' />
- Exclude checks
Unexpected spaces found. Open
<input type='hidden' name='xoops_url' value='".$this->sanitizer->htmlSpecialChars($this->xoops_url)."' />
- Exclude checks
Unexpected spaces found. Open
<input type='radio' name='db_pconnect' value='0'".($this->db_pconnect != 1 ? " checked='checked'" : "" )." />"._INSTALL_L24."
- Exclude checks
Unexpected spaces found. Open
<td class='bg3'><b>"._INSTALL_L51."</b></td>
- Exclude checks
Unexpected spaces found. Open
<td class='bg3'><b>"._INSTALL_L27."</b></td>
- Exclude checks
Unexpected spaces found. Open
<tr>
- Exclude checks
Unexpected spaces found. Open
<input type='hidden' name='dbpass' value='".$this->sanitizer->htmlSpecialChars($this->dbpass)."' />
- Exclude checks
Unexpected spaces found. Open
"<table width='100%' class='outer' cellspacing='5'>
- Exclude checks
Unexpected spaces found. Open
<span style='font-size:85%;'>".$desc."</span>
- Exclude checks
Unexpected spaces found. Open
</td>
- Exclude checks
Unexpected spaces found. Open
</tr>
- Exclude checks
Unexpected spaces found. Open
<td class='bg3'><b>"._INSTALL_L28."</b></td>
- Exclude checks
Unexpected spaces found. Open
<td class='bg3'><b>"._INSTALL_L54."</b></td>
- Exclude checks
Unexpected spaces found. Open
</tr>
- Exclude checks
Unexpected spaces found. Open
<td class='bg1'>".$this->sanitizer->htmlSpecialChars($this->xoops_url)."</td>
- Exclude checks
Unexpected spaces found. Open
<input type='hidden' name='db_pconnect' value='". (int) ($this->db_pconnect)."' />
- Exclude checks
Unexpected spaces found. Open
<tr valign='top' align='left'>
- Exclude checks
Unexpected spaces found. Open
<td class='head'>
- Exclude checks
Unexpected spaces found. Open
</tr>
- Exclude checks
Unexpected spaces found. Open
<td class='bg3'><b>"._INSTALL_L52."</b></td>
- Exclude checks
Unexpected spaces found. Open
</tr>
- Exclude checks
Unexpected spaces found. Open
</table></td></tr>
- Exclude checks
Unexpected spaces found. Open
<tr>
- Exclude checks
Unexpected spaces found. Open
</tr>
- Exclude checks
Unexpected spaces found. Open
</td>
- Exclude checks
Unexpected spaces found. Open
<table width='100%' border='0' cellpadding='4' cellspacing='1'>
- Exclude checks
Unexpected spaces found. Open
</tr>
- Exclude checks
Unexpected spaces found. Open
<td class='bg1'>".$this->sanitizer->htmlSpecialChars($this->root_path)."</td>
- Exclude checks
Unexpected spaces found. Open
<td class='head'>
- Exclude checks
Unexpected spaces found. Open
<b>"._INSTALL_L54."</b><br />
- Exclude checks
Unexpected spaces found. Open
<td class='even'>
- Exclude checks
Unexpected spaces found. Open
<td class='bg1'>".$yesno."</td>
- Exclude checks
Unexpected spaces found. Open
<td class='bg3'><b>"._INSTALL_L56."</b></td>
- Exclude checks
Unexpected spaces found. Open
<th colspan='2'></th>
- Exclude checks
Unexpected spaces found. Open
<input type='$inputType' name='".$name."' id='".$name."' size='30' maxlength='100' value='".htmlspecialchars($value)."' />
- Exclude checks
Unexpected spaces found. Open
</tr>
- Exclude checks
Unexpected spaces found. Open
<tr>
- Exclude checks
Unexpected spaces found. Open
</td>
- Exclude checks
Unexpected spaces found. Open
<td class='even'>
- Exclude checks
Unexpected spaces found. Open
<input type='hidden' name='database' value='".$this->sanitizer->htmlSpecialChars($this->database)."' />
- Exclude checks
Unexpected spaces found. Open
<input type='hidden' name='dbname' value='".$this->sanitizer->htmlSpecialChars($this->dbname)."' />
- Exclude checks
Unexpected spaces found. Open
<span style='font-size:85%;'>"._INSTALL_L69."</span>
- Exclude checks
Unexpected spaces found. Open
</tr>
- Exclude checks
Unexpected spaces found. Open
</table>
- Exclude checks
Unexpected spaces found. Open
<input type='hidden' name='prefix' value='".$this->sanitizer->htmlSpecialChars($this->prefix)."' />
- Exclude checks
Unexpected spaces found. Open
";
- Exclude checks