The method icms_debug has a boolean flag argument $exit, which is a certain sign of a Single Responsibility Principle violation. Open
function icms_debug($msg, $exit=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_Debug' in method 'icms_debug'. Open
icms_core_Debug::setDeprecated('icms_core_Debug::message');
- 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_Debug' in method 'icms_debug_vardump'. Open
return icms_core_Debug::vardump($var);
- 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_Debug' in method 'icms_debug'. Open
return icms_core_Debug::message($msg, $exit);
- 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_Debug' in method 'icms_deprecated'. Open
return icms_core_Debug::setDeprecated($replacement, $extra);
- 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_Debug' in method 'icms_debug_vardump'. Open
icms_core_Debug::setDeprecated('icms_core_Debug::vardump');
- 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_Debug' in method 'icms_deprecated'. Open
icms_core_Debug::setDeprecated('icms_core_Debug::setDeprecated');
- 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
Call to method setDeprecated
from undeclared class \icms_core_Debug
Open
return icms_core_Debug::setDeprecated($replacement, $extra);
- Exclude checks
Call to method vardump
from undeclared class \icms_core_Debug
Open
return icms_core_Debug::vardump($var);
- Exclude checks
Call to method setDeprecated
from undeclared class \icms_core_Debug
Open
icms_core_Debug::setDeprecated('icms_core_Debug::setDeprecated');
- Exclude checks
Call to method setDeprecated
from undeclared class \icms_core_Debug
Open
icms_core_Debug::setDeprecated('icms_core_Debug::message');
- Exclude checks
Call to method setDeprecated
from undeclared class \icms_core_Debug
Open
icms_core_Debug::setDeprecated('icms_core_Debug::vardump');
- Exclude checks
Call to method message
from undeclared class \icms_core_Debug
Open
return icms_core_Debug::message($msg, $exit);
- Exclude checks
Expected 0 spaces between opening bracket and argument "$replacement"; 1 found Open
function icms_deprecated( $replacement='', $extra='' ) {
- Exclude checks
Incorrect spacing between argument "$exit" and equals sign; expected 1 but found 0 Open
function icms_debug($msg, $exit=false)
- Exclude checks
Incorrect spacing between default value and equals sign for argument "$exit"; expected 1 but found 0 Open
function icms_debug($msg, $exit=false)
- Exclude checks
Opening brace should be on the same line as the declaration Open
{
- Exclude checks
Incorrect spacing between argument "$replacement" and equals sign; expected 1 but found 0 Open
function icms_deprecated( $replacement='', $extra='' ) {
- Exclude checks
Opening brace should be on the same line as the declaration Open
{
- Exclude checks
Expected 0 spaces between argument "$extra" and closing bracket; 1 found Open
function icms_deprecated( $replacement='', $extra='' ) {
- Exclude checks
Incorrect spacing between argument "$extra" and equals sign; expected 1 but found 0 Open
function icms_deprecated( $replacement='', $extra='' ) {
- Exclude checks
Incorrect spacing between default value and equals sign for argument "$replacement"; expected 1 but found 0 Open
function icms_deprecated( $replacement='', $extra='' ) {
- Exclude checks
Incorrect spacing between default value and equals sign for argument "$extra"; expected 1 but found 0 Open
function icms_deprecated( $replacement='', $extra='' ) {
- Exclude checks