The method exec() contains an eval expression. Open
eval($code);
- 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
File autotasks.php
has 256 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* ImpressCMS AUTOTASKS
*
* @copyright The ImpressCMS Project http://www.impresscms.org/
Function exec
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function exec() {
if (!$this->getVar('sat_enabled')) return FALSE;
if (((int) $this->getVar('sat_lastruntime') + (int) $this->getVar('sat_interval') * 60) > time()) return FALSE;
$code = $this->getVar('sat_code');
ignore_user_abort(TRUE);
- 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 exec
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function exec() {
if (!$this->getVar('sat_enabled')) return FALSE;
if (((int) $this->getVar('sat_lastruntime') + (int) $this->getVar('sat_interval') * 60) > time()) return FALSE;
$code = $this->getVar('sat_code');
ignore_user_abort(TRUE);
Function getSystemHandlersList
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function getSystemHandlersList($checkIfItIsAvaibleOnCurrentSystem = TRUE) {
static $ret = NULL;
if ($ret === NULL) {
$files = glob($this->getSystemHandlerFileName('*'));
$ret = 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
Method getForm
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function getForm($form_caption, $form_name, $form_action = FALSE, $submit_button_caption = _CO_ICMS_SUBMIT, $cancel_js_action = FALSE, $captcha = FALSE) {
Avoid too many return
statements within this method. Open
return FALSE;
Avoid too many return
statements within this method. Open
return TRUE;
Avoid too many return
statements within this method. Open
return TRUE;
Function getIntervalForDisplay
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getIntervalForDisplay() {
$int = $this->getVar('sat_interval');
$day = (int) ($int / 60 / 24);
$hou = (int) (($int - $day * 24 * 60) / 60);
- 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 exec() has a Cyclomatic Complexity of 10. The configured cyclomatic complexity threshold is 10. Open
public function exec() {
if (!$this->getVar('sat_enabled')) return FALSE;
if (((int) $this->getVar('sat_lastruntime') + (int) $this->getVar('sat_interval') * 60) > time()) return FALSE;
$code = $this->getVar('sat_code');
ignore_user_abort(TRUE);
- 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 getForm has a boolean flag argument $form_action, which is a certain sign of a Single Responsibility Principle violation. Open
public function getForm($form_caption, $form_name, $form_action = FALSE, $submit_button_caption = _CO_ICMS_SUBMIT, $cancel_js_action = FALSE, $captcha = 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
Missing class import via use statement (line '294', column '19'). 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
Missing class import via use statement (line '297', column '23'). Open
$criteria->add( new icms_db_criteria_Item('(sat_lastruntime + sat_interval)', time(), '<=', NULL, "%s" ));
- 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 '299', column '23'). Open
$criteria->add( new icms_db_criteria_Item('sat_enabled', 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 '227', column '47'). Open
if ($controller === NULL) $controller = new icms_ipf_Controller($this->handler);
- 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 getCurrentSystemHandler has a boolean flag argument $forceUpdate, which is a certain sign of a Single Responsibility Principle violation. Open
public function getCurrentSystemHandler($forceUpdate = 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
Remove error control operator '@' on line 176. Open
public function exec() {
if (!$this->getVar('sat_enabled')) return FALSE;
if (((int) $this->getVar('sat_lastruntime') + (int) $this->getVar('sat_interval') * 60) > time()) return FALSE;
$code = $this->getVar('sat_code');
ignore_user_abort(TRUE);
- 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 '298', column '23'). Open
$criteria->add( new icms_db_criteria_Item('sat_repeat', 0, '>=', NULL, "'%s'"));
- 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 getSystemHandlersList has a boolean flag argument $checkIfItIsAvaibleOnCurrentSystem, which is a certain sign of a Single Responsibility Principle violation. Open
public function getSystemHandlersList($checkIfItIsAvaibleOnCurrentSystem = TRUE) {
- 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
Remove error control operator '@' on line 178. Open
public function exec() {
if (!$this->getVar('sat_enabled')) return FALSE;
if (((int) $this->getVar('sat_lastruntime') + (int) $this->getVar('sat_interval') * 60) > time()) return FALSE;
$code = $this->getVar('sat_code');
ignore_user_abort(TRUE);
- 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
The method getForm has a boolean flag argument $captcha, which is a certain sign of a Single Responsibility Principle violation. Open
public function getForm($form_caption, $form_name, $form_action = FALSE, $submit_button_caption = _CO_ICMS_SUBMIT, $cancel_js_action = FALSE, $captcha = 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
The method getForm has a boolean flag argument $cancel_js_action, which is a certain sign of a Single Responsibility Principle violation. Open
public function getForm($form_caption, $form_name, $form_action = FALSE, $submit_button_caption = _CO_ICMS_SUBMIT, $cancel_js_action = FALSE, $captcha = 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
The method startIfNeeded uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
trigger_error("Can't start selected automated tasks handler.");
}
- 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 getSelectedSystemHandler uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
trigger_error('Needed autotask handler not found!');
}
- 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 exec uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$is_bug = !(@highlight_string('<?' . 'php '. $code . ' return TRUE; ?' . '>', 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
The method exec uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
// disable this task
$this->setVar('sat_enabled', 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 getLastRunTimeForDisplay uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
return formatTimestamp($this->getVar('sat_lastruntime'));
}
- 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 assigning values to variables in if clauses and the like (line '362', column '8'). Open
public function getRealTasksRunningTime() {
$sql = 'SELECT MIN(sat_interval) INTV FROM ' . $this->db->prefix('system_autotasks') . ' WHERE sat_enabled = TRUE LIMIT 1';
if (!$result = $this->db->query($sql)) {
return 0;
}
- 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
The method getRepeatForDisplay uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
return $this->getVar('sat_repeat');
}
- 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 getForm uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$this->doShowFieldOnForm('sat_code');
$this->doShowFieldOnForm('sat_onfinish');
}
- 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 assigning values to variables in if clauses and the like (line '311', column '9'). Open
public function execTasks() {
$rez = array('all' => 0, 'ok' => 0);
if (!($tasks = $this->getTasks())) return $rez;
foreach ($tasks as $task) {
if ($task->exec()) {
- 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 'getConfig'. Open
$config_handler = icms::handler('icms_config');
- 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
When fetching an array index from a value of type array<int>,</int>
found an array index of type string,
but expected the index to be of type int
Open
return $type[$part];
- 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 class \icms_ipf_Object
Open
parent::__construct($handler);
- Exclude checks
Call to undeclared method \SystemAutoTasks::quickInitVar
Open
$this->quickInitVar('sat_name', XOBJ_DTYPE_TXTBOX, TRUE, _CO_ICMS_AUTOTASKS_NAME, _CO_ICMS_AUTOTASKS_NAME_DSC);
- Exclude checks
Call to undeclared method \SystemAutoTasks::setControl
Open
$this->setControl('sat_enabled', 'yesno');
- Exclude checks
Call to undeclared method \SystemAutoTasks::getVar
Open
if ($this->getVar('sat_lastruntime') < 1) {
- Exclude checks
Call to undeclared method \SystemAutoTasks::setVar
Open
$this->setVar('sat_repeat', $count);
- Exclude checks
Call to undeclared method \SystemAutoTasks::doHideFieldFromForm
Open
$this->doHideFieldFromForm('sat_onfinish');
- Exclude checks
Reference to undeclared class \icms_ipf_Object
Open
return parent::getForm($form_caption, $form_name, $form_action, $submit_button_caption, $cancel_js_action, $captcha);
- Exclude checks
Call to undeclared method \SystemAutoTasks::getVar
Open
$type = $this->getVar('sat_type');
- Exclude checks
Reference to undeclared class \icms_ipf_Handler
Open
parent::__construct($db, 'autotasks', 'sat_id', 'sat_name', 'sat_code', 'system');
- Exclude checks
Argument 1 (part)
is 0
but \SystemAutoTasks::getType()
takes string
defined at /code/htdocs/modules/system/admin/autotasks/class/autotasks.php:121
Open
return constant('_CO_ICMS_AUTOTASKS_TYPE_' . strtoupper($this->getType(0)));
- Exclude checks
Call to undeclared method \SystemAutoTasks::getVar
Open
$count = $this->getVar('sat_repeat');
- Exclude checks
Call to undeclared method \SystemAutoTasks::setVar
Open
$this->setVar('sat_lastruntime', time());
- Exclude checks
Call to undeclared method \SystemAutoTasks::getVar
Open
return $this->getVar('sat_name');
- Exclude checks
Reference to undeclared constant \XOBJ_DTYPE_INT
Open
$this->quickInitVar('sat_onfinish', XOBJ_DTYPE_INT, TRUE, _CO_ICMS_AUTOTASKS_ONFINISH, _CO_ICMS_AUTOTASKS_ONFINISH_DSC, 0);
- Exclude checks
Call to undeclared method \SystemAutoTasks::getVar
Open
if ($this->getVar('sat_repeat') < 1) {
- Exclude checks
Call to undeclared method \SystemAutoTasks::getVar
Open
$int = $this->getVar('sat_interval');
- Exclude checks
Reference to undeclared constant \_DAYS
Open
$ret .= sprintf(_DAYS, $day) . ' ';
- Exclude checks
Call to undeclared method \SystemAutoTasks::getVar
Open
if ($this->getVar('sat_onfinish')) {
- Exclude checks
Call to method setOrder
from undeclared class \icms_db_criteria_Compo
Open
$criteria->setOrder('ASC');
- Exclude checks
Call to undeclared method \SystemAutoTasks::quickInitVar
Open
$this->quickInitVar('sat_interval', XOBJ_DTYPE_INT, TRUE, _CO_ICMS_AUTOTASKS_INTERVAL, _CO_ICMS_AUTOTASKS_INTERVAL_DSC, 24 * 60);
- Exclude checks
Call to undeclared method \SystemAutoTasks::doHideFieldFromForm
Open
$this->doHideFieldFromForm('sat_lastruntime');
- Exclude checks
Reference to undeclared constant \_HOUR
Open
$ret .= _HOUR . ' ';
- Exclude checks
Call to method handler
from undeclared class \icms
Open
$module = icms::handler("icms_module")->getByDirname($dirname);
- Exclude checks
Argument 1 (part)
is 0
but \SystemAutoTasks::getType()
takes string
defined at /code/htdocs/modules/system/admin/autotasks/class/autotasks.php:121
Open
if ($this->getType(0)=='addon') {
- Exclude checks
Call to undeclared method \SystemAutoTasks::doShowFieldOnForm
Open
$this->doShowFieldOnForm('sat_code');
- Exclude checks
Call to undeclared method \SystemAutoTasks::doShowFieldOnForm
Open
$this->doShowFieldOnForm('sat_onfinish');
- Exclude checks
Return type of getCurrentSystemHandler()
is undeclared type \AutomatedTasks
Open
public function getCurrentSystemHandler($forceUpdate = FALSE) {
- Exclude checks
Call to method __construct
from undeclared class \icms_db_criteria_Item
Open
$criteria->add( new icms_db_criteria_Item('(sat_lastruntime + sat_interval)', time(), '<=', NULL, "%s" ));
- Exclude checks
Reference to undeclared constant \XOBJ_DTYPE_INT
Open
$this->quickInitVar('sat_interval', XOBJ_DTYPE_INT, TRUE, _CO_ICMS_AUTOTASKS_INTERVAL, _CO_ICMS_AUTOTASKS_INTERVAL_DSC, 24 * 60);
- Exclude checks
Call to undeclared method \SystemAutoTasks::quickInitVar
Open
$this->quickInitVar('sat_type', XOBJ_DTYPE_TXTBOX, TRUE, _CO_ICMS_AUTOTASKS_TYPE, NULL, ':custom');
- Exclude checks
Call to undeclared method \SystemAutoTasks::quickInitVar
Open
$this->quickInitVar('sat_addon_id', XOBJ_DTYPE_INT, FALSE);
- Exclude checks
Call to undeclared method \SystemAutoTasks::doHideFieldFromForm
Open
$this->doHideFieldFromForm('sat_addon_id');
- Exclude checks
Reference to undeclared constant \_YES
Open
return ($this->getVar('sat_enabled')==1) ? _YES : _NO;
- Exclude checks
Call to undeclared method \SystemAutoTasks::getVar
Open
return ($this->getVar('sat_onfinish')==1) ? _YES : _NO;
- Exclude checks
Call to undeclared method \SystemAutoTasks::getVar
Open
if (!$this->getVar('sat_enabled')) return FALSE;
- Exclude checks
Reference to undeclared property \SystemAutoTasks->handler
Open
$this->handler->insert($this, TRUE);
- Exclude checks
Call to method __construct
from undeclared class \icms_db_criteria_Item
Open
$criteria->add( new icms_db_criteria_Item('sat_repeat', 0, '>=', NULL, "'%s'"));
- Exclude checks
Class extends undeclared class \icms_ipf_Object
Open
class SystemAutoTasks extends icms_ipf_Object {
- Exclude checks
Call to undeclared method \SystemAutoTasks::quickInitVar
Open
$this->quickInitVar('sat_id', XOBJ_DTYPE_INT, FALSE);
- Exclude checks
Reference to undeclared constant \XOBJ_DTYPE_INT
Open
$this->quickInitVar('sat_repeat', XOBJ_DTYPE_INT, TRUE, _CO_ICMS_AUTOTASKS_REPEAT, _CO_ICMS_AUTOTASKS_REPEAT_DSC, 0);
- Exclude checks
Call to undeclared method \SystemAutoTasks::setControl
Open
$this->setControl('sat_onfinish', 'yesno');
- Exclude checks
Call to undeclared method \SystemAutoTasks::doHideFieldFromForm
Open
$this->doHideFieldFromForm('sat_code');
- Exclude checks
Saw possibly unextractable annotation for a fragment of comment '* @param array':
after array,
did not see an element name (will guess based on comment order) Open
* @param array
- Exclude checks
Call to undeclared method \SystemAutoTasks::quickInitVar
Open
$this->quickInitVar('sat_lastruntime', XOBJ_DTYPE_INT, FALSE, _CO_ICMS_AUTOTASKS_LASTRUNTIME, NULL, 0);
- Exclude checks
Call to undeclared method \SystemAutoTasks::getVar
Open
return formatTimestamp($this->getVar('sat_lastruntime'));
- Exclude checks
Returning type array<int></int>
but getType()
is declared to return string
Open
if ($part === NULL) return $type;
- Exclude checks
Call to method getDeleteItemLink
from undeclared class \icms_ipf_Controller
Open
return $controller->getDeleteItemLink($this, FALSE, TRUE, FALSE);
- Exclude checks
Call to method canRun
from undeclared class \AutomatedTasks
Open
if ($checkIfItIsAvaibleOnCurrentSystem && (!$handler->canRun())) {
- Exclude checks
Reference to undeclared constant \XOBJ_DTYPE_TXTBOX
Open
$this->quickInitVar('sat_type', XOBJ_DTYPE_TXTBOX, TRUE, _CO_ICMS_AUTOTASKS_TYPE, NULL, ':custom');
- Exclude checks
Call to undeclared method \SystemAutoTasks::setControl
Open
$this->setControl('sat_name', 'text');
- Exclude checks
Call to undeclared method \SystemAutoTasks::getVar
Open
if (((int) $this->getVar('sat_lastruntime') + (int) $this->getVar('sat_interval') * 60) > time()) return FALSE;
- Exclude checks
Call to undeclared method \SystemAutotasksHandler::getObjects
Open
$rez = $this->getObjects($criteria, FALSE);
- Exclude checks
Call to method needExit
from undeclared class \AutomatedTasks
Open
return $this->getCurrentSystemHandler()->needExit();
- Exclude checks
Call to undeclared method \SystemAutoTasks::quickInitVar
Open
$this->quickInitVar('sat_repeat', XOBJ_DTYPE_INT, TRUE, _CO_ICMS_AUTOTASKS_REPEAT, _CO_ICMS_AUTOTASKS_REPEAT_DSC, 0);
- Exclude checks
Call to undeclared method \SystemAutoTasks::quickInitVar
Open
$this->quickInitVar('sat_onfinish', XOBJ_DTYPE_INT, TRUE, _CO_ICMS_AUTOTASKS_ONFINISH, _CO_ICMS_AUTOTASKS_ONFINISH_DSC, 0);
- Exclude checks
Call to undeclared method \SystemAutoTasks::getVar
Open
return $this->getVar('sat_repeat');
- Exclude checks
Reference to undeclared constant \_NO
Open
return ($this->getVar('sat_enabled')==1) ? _YES : _NO;
- Exclude checks
Reference to undeclared property \SystemAutoTasks->handler
Open
$this->handler->delete($this);
- Exclude checks
Argument 1 (part)
is 0
but \SystemAutoTasks::getType()
takes string
defined at /code/htdocs/modules/system/admin/autotasks/class/autotasks.php:121
Open
if ($this->getType(0) == 'addon') return;
- Exclude checks
Call to method add
from undeclared class \icms_db_criteria_Compo
Open
$criteria->add( new icms_db_criteria_Item('sat_repeat', 0, '>=', NULL, "'%s'"));
- Exclude checks
Reference to undeclared constant \XOBJ_DTYPE_SOURCE
Open
$this->quickInitVar('sat_code', XOBJ_DTYPE_SOURCE, TRUE, _CO_ICMS_AUTOTASKS_CODE, _CO_ICMS_AUTOTASKS_CODE_DSC);
- Exclude checks
Call to undeclared method \SystemAutoTasks::getVar
Open
$code = $this->getVar('sat_code');
- Exclude checks
Call to method __construct
from undeclared class \icms_ipf_Controller
Open
if ($controller === NULL) $controller = new icms_ipf_Controller($this->handler);
- Exclude checks
Reference to undeclared property \SystemAutoTasks->handler
Open
if ($controller === NULL) $controller = new icms_ipf_Controller($this->handler);
- Exclude checks
Saw possibly unextractable annotation for a fragment of comment '* @param string name':
after string,
did not see an element name (will guess based on comment order) Open
* @param string name
- Exclude checks
Reference to undeclared constant \XOBJ_DTYPE_TXTBOX
Open
$this->quickInitVar('sat_name', XOBJ_DTYPE_TXTBOX, TRUE, _CO_ICMS_AUTOTASKS_NAME, _CO_ICMS_AUTOTASKS_NAME_DSC);
- Exclude checks
Call to undeclared method \SystemAutoTasks::quickInitVar
Open
$this->quickInitVar('sat_code', XOBJ_DTYPE_SOURCE, TRUE, _CO_ICMS_AUTOTASKS_CODE, _CO_ICMS_AUTOTASKS_CODE_DSC);
- Exclude checks
Reference to undeclared constant \XOBJ_DTYPE_INT
Open
$this->quickInitVar('sat_enabled', XOBJ_DTYPE_INT, TRUE, _CO_ICMS_AUTOTASKS_ENABLED, _CO_ICMS_AUTOTASKS_ENABLED_DSC, 1);
- Exclude checks
Reference to undeclared constant \XOBJ_DTYPE_INT
Open
$this->quickInitVar('sat_addon_id', XOBJ_DTYPE_INT, FALSE);
- Exclude checks
Call to undeclared method \SystemAutoTasks::doHideFieldFromForm
Open
$this->doHideFieldFromForm('sat_type');
- Exclude checks
Reference to undeclared constant \_DAY
(Did you mean $day) Open
$ret .= _DAY . ' ';
- Exclude checks
Call to undeclared method \SystemAutoTasks::getVar
Open
return ($this->getVar('sat_enabled')==1) ? _YES : _NO;
- Exclude checks
Call to undeclared method \SystemAutoTasks::getVar
Open
if (substr($this->getVar('sat_type'), 0, 6) == 'addon/') {
- Exclude checks
Call to undeclared method \SystemAutoTasks::setVar
Open
$this->setVar('sat_enabled', 0);
- Exclude checks
Class extends undeclared class \icms_ipf_Handler
Open
class SystemAutotasksHandler extends icms_ipf_Handler {
- Exclude checks
Call to method canRun
from undeclared class \AutomatedTasks
Open
if ($system->canRun()) {
- Exclude checks
Call to method start
from undeclared class \AutomatedTasks
Open
$system->start($this->getRealTasksRunningTime());
- Exclude checks
Reference to undeclared constant \XOBJ_DTYPE_INT
Open
$this->quickInitVar('sat_id', XOBJ_DTYPE_INT, FALSE);
- Exclude checks
Reference to undeclared constant \XOBJ_DTYPE_INT
Open
$this->quickInitVar('sat_lastruntime', XOBJ_DTYPE_INT, FALSE, _CO_ICMS_AUTOTASKS_LASTRUNTIME, NULL, 0);
- Exclude checks
Call to undeclared method \SystemAutoTasks::quickInitVar
Open
$this->quickInitVar('sat_enabled', XOBJ_DTYPE_INT, TRUE, _CO_ICMS_AUTOTASKS_ENABLED, _CO_ICMS_AUTOTASKS_ENABLED_DSC, 1);
- Exclude checks
Reference to undeclared constant \_HOURS
Open
$ret .= sprintf(_HOURS, $hou) . ' ';
- Exclude checks
Reference to undeclared constant \_MINUTE
Open
$ret .= _MINUTE;
- Exclude checks
Reference to undeclared constant \_MINUTES
Open
$ret .= sprintf(_MINUTES, $min);
- Exclude checks
Reference to undeclared constant \_NO
Open
return ($this->getVar('sat_onfinish')==1) ? _YES : _NO;
- Exclude checks
Reference to undeclared constant \_YES
Open
return ($this->getVar('sat_onfinish')==1) ? _YES : _NO;
- Exclude checks
Call to undeclared method \SystemAutoTasks::getVar
Open
$dirname = substr($this->getVar('sat_type'), 6);
- Exclude checks
Reference to undeclared property \SystemAutotasksHandler->db
Open
if (!$result = $this->db->query($sql)) {
- Exclude checks
Call to method __construct
from undeclared class \icms_db_criteria_Item
Open
$criteria->add( new icms_db_criteria_Item('sat_enabled', 1));
- Exclude checks
Reference to undeclared property \SystemAutotasksHandler->db
Open
$data = $this->db->fetchArray($result);
- Exclude checks
Saw a token Phan may have failed to parse after '* @return Array(ConfigObjectItems)':
after Array,
saw '('
Open
* @return Array(ConfigObjectItems)
- Exclude checks
Saw possibly unextractable annotation for a fragment of comment '* @param int $ type':
after int,
did not see an element name (will guess based on comment order) Open
* @param int $ type
- Exclude checks
Call to method needExecution
from undeclared class \AutomatedTasks
Open
return $this->getCurrentSystemHandler()->needExecution();
- Exclude checks
Reference to undeclared property \SystemAutotasksHandler->db
Open
$sql = 'SELECT MIN(sat_interval) INTV FROM ' . $this->db->prefix('system_autotasks') . ' WHERE sat_enabled = TRUE LIMIT 1';
- Exclude checks
Call to method handler
from undeclared class \icms
Open
$config_handler = icms::handler('icms_config');
- Exclude checks
Saw possibly unextractable annotation for a fragment of comment '* @param bool force update handler':
after bool,
did not see an element name (will guess based on comment order) Open
* @param bool force update handler
- Exclude checks
Saw possibly unextractable annotation for a fragment of comment '* @param string filename':
after string,
did not see an element name (will guess based on comment order) Open
* @param string filename
- Exclude checks
Call to method needStart
from undeclared class \AutomatedTasks
Open
if ($system->needStart()) {
- Exclude checks
Reference to undeclared constant \ICMS_CONF_AUTOTASKS
Open
$config_atasks = $config_handler->getConfigsByCat(ICMS_CONF_AUTOTASKS);
- Exclude checks
Call to method add
from undeclared class \icms_db_criteria_Compo
Open
$criteria->add( new icms_db_criteria_Item('(sat_lastruntime + sat_interval)', time(), '<=', NULL, "%s" ));
- Exclude checks
Saw possibly unextractable annotation for a fragment of comment '* @param bool':
after bool,
did not see an element name (will guess based on comment order) Open
* @param bool
- Exclude checks
Saw possibly unextractable annotation for a fragment of comment '* @param string system name':
after string,
did not see an element name (will guess based on comment order) Open
* @param string system name
- Exclude checks
Call to method add
from undeclared class \icms_db_criteria_Compo
Open
$criteria->add( new icms_db_criteria_Item('sat_enabled', 1));
- Exclude checks
Suspicious array access to false
Open
$ret[] = $name;
- Exclude checks
Return type of getSelectedSystemHandler()
is undeclared type \AutomatedTasks
Open
public function getSelectedSystemHandler($name) {
- Exclude checks
Call to method setSort
from undeclared class \icms_db_criteria_Compo
Open
$criteria->setSort('sat_lastruntime');
- Exclude checks
Saw possibly unextractable annotation for a fragment of comment '* @param bool checkIfItIsAvaibleOnCurrentSystem':
after bool,
did not see an element name (will guess based on comment order) Open
* @param bool checkIfItIsAvaibleOnCurrentSystem
- Exclude checks
Avoid excessively long variable names like $submit_button_caption. Keep variable name length under 20. Open
public function getForm($form_caption, $form_name, $form_action = FALSE, $submit_button_caption = _CO_ICMS_SUBMIT, $cancel_js_action = FALSE, $captcha = FALSE) {
- 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 excessively long variable names like $checkIfItIsAvaibleOnCurrentSystem. Keep variable name length under 20. Open
public function getSystemHandlersList($checkIfItIsAvaibleOnCurrentSystem = TRUE) {
- 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
Each class must be in a namespace of at least one level (a top-level vendor name) Open
class SystemAutoTasks extends icms_ipf_Object {
- Exclude checks
Each class must be in a namespace of at least one level (a top-level vendor name) Open
class SystemAutotasksHandler extends icms_ipf_Handler {
- Exclude checks
The property $_virtual_config is not named in camelCase. Open
class SystemAutotasksHandler extends icms_ipf_Handler {
private $_use_virtual_config = FALSE;
private $_virtual_config = array();
- 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 parameter $form_caption is not named in camelCase. Open
public function getForm($form_caption, $form_name, $form_action = FALSE, $submit_button_caption = _CO_ICMS_SUBMIT, $cancel_js_action = FALSE, $captcha = FALSE) {
if ($this->getType(0)=='addon') {
$this->doHideFieldFromForm('sat_code');
$this->doHideFieldFromForm('sat_onfinish');
} else {
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $form_name is not named in camelCase. Open
public function getForm($form_caption, $form_name, $form_action = FALSE, $submit_button_caption = _CO_ICMS_SUBMIT, $cancel_js_action = FALSE, $captcha = FALSE) {
if ($this->getType(0)=='addon') {
$this->doHideFieldFromForm('sat_code');
$this->doHideFieldFromForm('sat_onfinish');
} else {
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The property $_use_virtual_config is not named in camelCase. Open
class SystemAutotasksHandler extends icms_ipf_Handler {
private $_use_virtual_config = FALSE;
private $_virtual_config = array();
- 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 parameter $submit_button_caption is not named in camelCase. Open
public function getForm($form_caption, $form_name, $form_action = FALSE, $submit_button_caption = _CO_ICMS_SUBMIT, $cancel_js_action = FALSE, $captcha = FALSE) {
if ($this->getType(0)=='addon') {
$this->doHideFieldFromForm('sat_code');
$this->doHideFieldFromForm('sat_onfinish');
} else {
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $cancel_js_action is not named in camelCase. Open
public function getForm($form_caption, $form_name, $form_action = FALSE, $submit_button_caption = _CO_ICMS_SUBMIT, $cancel_js_action = FALSE, $captcha = FALSE) {
if ($this->getType(0)=='addon') {
$this->doHideFieldFromForm('sat_code');
$this->doHideFieldFromForm('sat_onfinish');
} else {
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
Avoid variables with short names like $db. Configured minimum length is 3. Open
public function __construct($db) {
- 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
The parameter $form_action is not named in camelCase. Open
public function getForm($form_caption, $form_name, $form_action = FALSE, $submit_button_caption = _CO_ICMS_SUBMIT, $cancel_js_action = FALSE, $captcha = FALSE) {
if ($this->getType(0)=='addon') {
$this->doHideFieldFromForm('sat_code');
$this->doHideFieldFromForm('sat_onfinish');
} else {
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
Each class must be in a file by itself Open
class SystemAutotasksHandler extends icms_ipf_Handler {
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE" Open
if ($dirname == '') return FALSE;
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE" Open
public function getForm($form_caption, $form_name, $form_action = FALSE, $submit_button_caption = _CO_ICMS_SUBMIT, $cancel_js_action = FALSE, $captcha = FALSE) {
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE" Open
$this->quickInitVar('sat_id', XOBJ_DTYPE_INT, FALSE);
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE" Open
return $controller->getDeleteItemLink($this, FALSE, TRUE, FALSE);
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE" Open
return $controller->getDeleteItemLink($this, FALSE, TRUE, FALSE);
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE" Open
icms_loadLanguageFile('system', 'autotasks', TRUE);
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE" Open
return TRUE;
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE" Open
$this->_use_virtual_config = FALSE;
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL" Open
static $ret = NULL;
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE" Open
$this->handler->insert($this, TRUE);
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE" Open
static $handler = FALSE;
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE" Open
ignore_user_abort(TRUE);
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE" Open
private $_use_virtual_config = FALSE;
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL" Open
$criteria->add( new icms_db_criteria_Item('(sat_lastruntime + sat_interval)', time(), '<=', NULL, "%s" ));
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL" Open
$this->quickInitVar('sat_lastruntime', XOBJ_DTYPE_INT, FALSE, _CO_ICMS_AUTOTASKS_LASTRUNTIME, NULL, 0);
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE" Open
$this->quickInitVar('sat_addon_id', XOBJ_DTYPE_INT, FALSE);
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL" Open
static $controller = NULL;
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE" Open
return TRUE;
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE" Open
return $controller->getDeleteItemLink($this, FALSE, TRUE, FALSE);
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE" Open
if ($forceUpdate || ($handler === FALSE)) {
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE" Open
$this->quickInitVar('sat_repeat', XOBJ_DTYPE_INT, TRUE, _CO_ICMS_AUTOTASKS_REPEAT, _CO_ICMS_AUTOTASKS_REPEAT_DSC, 0);
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE" Open
$this->quickInitVar('sat_interval', XOBJ_DTYPE_INT, TRUE, _CO_ICMS_AUTOTASKS_INTERVAL, _CO_ICMS_AUTOTASKS_INTERVAL_DSC, 24 * 60);
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE" Open
$this->quickInitVar('sat_type', XOBJ_DTYPE_TXTBOX, TRUE, _CO_ICMS_AUTOTASKS_TYPE, NULL, ':custom');
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE" Open
$this->quickInitVar('sat_name', XOBJ_DTYPE_TXTBOX, TRUE, _CO_ICMS_AUTOTASKS_NAME, _CO_ICMS_AUTOTASKS_NAME_DSC);
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL" Open
$this->quickInitVar('sat_type', XOBJ_DTYPE_TXTBOX, TRUE, _CO_ICMS_AUTOTASKS_TYPE, NULL, ':custom');
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE" Open
$is_bug = !(@highlight_string('<?' . 'php '. $code . ' return TRUE; ?' . '>', TRUE));
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE" Open
if (!$this->getVar('sat_enabled')) return FALSE;
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE" Open
public function getForm($form_caption, $form_name, $form_action = FALSE, $submit_button_caption = _CO_ICMS_SUBMIT, $cancel_js_action = FALSE, $captcha = FALSE) {
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL" Open
$criteria->add( new icms_db_criteria_Item('sat_repeat', 0, '>=', NULL, "'%s'"));
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE" Open
public function getCurrentSystemHandler($forceUpdate = FALSE) {
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE" Open
public $content = FALSE;
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL" Open
public function getType($part = NULL) {
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE" Open
if (((int) $this->getVar('sat_lastruntime') + (int) $this->getVar('sat_interval') * 60) > time()) return FALSE;
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE" Open
public function getForm($form_caption, $form_name, $form_action = FALSE, $submit_button_caption = _CO_ICMS_SUBMIT, $cancel_js_action = FALSE, $captcha = FALSE) {
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE" Open
$rez = $this->getObjects($criteria, FALSE);
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE" Open
$this->quickInitVar('sat_enabled', XOBJ_DTYPE_INT, TRUE, _CO_ICMS_AUTOTASKS_ENABLED, _CO_ICMS_AUTOTASKS_ENABLED_DSC, 1);
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL" Open
if ($part === NULL) return $type;
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE" Open
$is_bug = !(@highlight_string(file_get_contents($dirname), TRUE));
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL" Open
if ($controller === NULL) $controller = new icms_ipf_Controller($this->handler);
- Exclude checks
The closing brace for the class must go on the next line after the body Open
}
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE" Open
$ret = FALSE;
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE" Open
$this->quickInitVar('sat_lastruntime', XOBJ_DTYPE_INT, FALSE, _CO_ICMS_AUTOTASKS_LASTRUNTIME, NULL, 0);
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE" Open
$this->quickInitVar('sat_code', XOBJ_DTYPE_SOURCE, TRUE, _CO_ICMS_AUTOTASKS_CODE, _CO_ICMS_AUTOTASKS_CODE_DSC);
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE" Open
if ($module->getVar("isactive") != 1) return FALSE;
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE" Open
return FALSE;
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE" Open
$this->_use_virtual_config = TRUE;
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE" Open
public function getSystemHandlersList($checkIfItIsAvaibleOnCurrentSystem = TRUE) {
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL" Open
if ($ret === NULL) {
- Exclude checks
TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE" Open
$this->quickInitVar('sat_onfinish', XOBJ_DTYPE_INT, TRUE, _CO_ICMS_AUTOTASKS_ONFINISH, _CO_ICMS_AUTOTASKS_ONFINISH_DSC, 0);
- Exclude checks
Inline control structures are not allowed Open
if (((int) $this->getVar('sat_lastruntime') + (int) $this->getVar('sat_interval') * 60) > time()) return FALSE;
- Exclude checks
Inline control structures are not allowed Open
if ($controller === NULL) $controller = new icms_ipf_Controller($this->handler);
- Exclude checks
Inline control structures are not allowed Open
if (!($tasks = $this->getTasks())) return $rez;
- Exclude checks
Inline control structures are not allowed Open
if (!$handler) continue;
- Exclude checks
Inline control structures are not allowed Open
if ($module->getVar("isactive") != 1) return FALSE;
- Exclude checks
Inline control structures are not allowed Open
if ($dirname == '') return FALSE;
- Exclude checks
Inline control structures are not allowed Open
if ($this->getType(0) == 'addon') return;
- Exclude checks
Inline control structures are not allowed Open
if (!$this->getVar('sat_enabled')) return FALSE;
- Exclude checks
Inline control structures are not allowed Open
if ($part === NULL) return $type;
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$criteria->add( new icms_db_criteria_Item('sat_repeat', 0, '>=', NULL, "'%s'"));
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$criteria->add( new icms_db_criteria_Item('(sat_lastruntime + sat_interval)', time(), '<=', NULL, "%s" ));
- Exclude checks
Space after opening parenthesis of function call prohibited Open
$criteria->add( new icms_db_criteria_Item('sat_enabled', 1));
- Exclude checks
Expected 0 spaces before closing bracket; 1 found Open
$criteria->add( new icms_db_criteria_Item('(sat_lastruntime + sat_interval)', time(), '<=', NULL, "%s" ));
- Exclude checks
The variable $config_handler is not named in camelCase. Open
public function getConfig() {
if ($this->isVirtualConfigEnabled()) {
return $this->_virtual_config;
}
//$old_handler_name = get_class($handler);
- 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 $config_atasks is not named in camelCase. Open
public function getCurrentSystemHandler($forceUpdate = FALSE) {
static $handler = FALSE;
if ($forceUpdate || ($handler === FALSE)) {
$config_atasks = $this->getConfig();
$handler = $this->getSelectedSystemHandler($config_atasks['autotasks_system']);
- 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 $submit_button_caption is not named in camelCase. Open
public function getForm($form_caption, $form_name, $form_action = FALSE, $submit_button_caption = _CO_ICMS_SUBMIT, $cancel_js_action = FALSE, $captcha = FALSE) {
if ($this->getType(0)=='addon') {
$this->doHideFieldFromForm('sat_code');
$this->doHideFieldFromForm('sat_onfinish');
} else {
- 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 $handler_name is not named in camelCase. Open
public function getSelectedSystemHandler($name) {
if ("$name" == '') {
$name = 'internal';
}
$name = trim(strtolower($name));
- 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 $config_atasks is not named in camelCase. Open
public function getCurrentSystemHandler($forceUpdate = FALSE) {
static $handler = FALSE;
if ($forceUpdate || ($handler === FALSE)) {
$config_atasks = $this->getConfig();
$handler = $this->getSelectedSystemHandler($config_atasks['autotasks_system']);
- 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 $is_bug is not named in camelCase. Open
public function exec() {
if (!$this->getVar('sat_enabled')) return FALSE;
if (((int) $this->getVar('sat_lastruntime') + (int) $this->getVar('sat_interval') * 60) > time()) return FALSE;
$code = $this->getVar('sat_code');
ignore_user_abort(TRUE);
- 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 $is_bug is not named in camelCase. Open
public function exec() {
if (!$this->getVar('sat_enabled')) return FALSE;
if (((int) $this->getVar('sat_lastruntime') + (int) $this->getVar('sat_interval') * 60) > time()) return FALSE;
$code = $this->getVar('sat_code');
ignore_user_abort(TRUE);
- 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 $is_bug is not named in camelCase. Open
public function exec() {
if (!$this->getVar('sat_enabled')) return FALSE;
if (((int) $this->getVar('sat_lastruntime') + (int) $this->getVar('sat_interval') * 60) > time()) return FALSE;
$code = $this->getVar('sat_code');
ignore_user_abort(TRUE);
- 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 $handler_name is not named in camelCase. Open
public function getSelectedSystemHandler($name) {
if ("$name" == '') {
$name = 'internal';
}
$name = trim(strtolower($name));
- 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 $config_atasks is not named in camelCase. Open
public function getConfig() {
if ($this->isVirtualConfigEnabled()) {
return $this->_virtual_config;
}
//$old_handler_name = get_class($handler);
- 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 $form_caption is not named in camelCase. Open
public function getForm($form_caption, $form_name, $form_action = FALSE, $submit_button_caption = _CO_ICMS_SUBMIT, $cancel_js_action = FALSE, $captcha = FALSE) {
if ($this->getType(0)=='addon') {
$this->doHideFieldFromForm('sat_code');
$this->doHideFieldFromForm('sat_onfinish');
} else {
- 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 $handler_name is not named in camelCase. Open
public function getSelectedSystemHandler($name) {
if ("$name" == '') {
$name = 'internal';
}
$name = trim(strtolower($name));
- 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 $config_atasks is not named in camelCase. Open
public function getConfig() {
if ($this->isVirtualConfigEnabled()) {
return $this->_virtual_config;
}
//$old_handler_name = get_class($handler);
- 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 $form_action is not named in camelCase. Open
public function getForm($form_caption, $form_name, $form_action = FALSE, $submit_button_caption = _CO_ICMS_SUBMIT, $cancel_js_action = FALSE, $captcha = FALSE) {
if ($this->getType(0)=='addon') {
$this->doHideFieldFromForm('sat_code');
$this->doHideFieldFromForm('sat_onfinish');
} else {
- 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 $form_name is not named in camelCase. Open
public function getForm($form_caption, $form_name, $form_action = FALSE, $submit_button_caption = _CO_ICMS_SUBMIT, $cancel_js_action = FALSE, $captcha = FALSE) {
if ($this->getType(0)=='addon') {
$this->doHideFieldFromForm('sat_code');
$this->doHideFieldFromForm('sat_onfinish');
} else {
- 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 $cancel_js_action is not named in camelCase. Open
public function getForm($form_caption, $form_name, $form_action = FALSE, $submit_button_caption = _CO_ICMS_SUBMIT, $cancel_js_action = FALSE, $captcha = FALSE) {
if ($this->getType(0)=='addon') {
$this->doHideFieldFromForm('sat_code');
$this->doHideFieldFromForm('sat_onfinish');
} else {
- 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 $config_handler is not named in camelCase. Open
public function getConfig() {
if ($this->isVirtualConfigEnabled()) {
return $this->_virtual_config;
}
//$old_handler_name = get_class($handler);
- 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
Unexpected trailing spaces found. Open
- Exclude checks
Unexpected trailing spaces found. Open
- Exclude checks