ImpressCMS/impresscms

View on GitHub
htdocs/modules/system/admin/autotasks/class/autotasks.php

Summary

Maintainability
C
1 day
Test Coverage

The method exec() contains an eval expression.
Open

        eval($code);

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/
Severity: Minor
Found in htdocs/modules/system/admin/autotasks/class/autotasks.php - About 2 hrs to fix

    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);
    Severity: Minor
    Found in htdocs/modules/system/admin/autotasks/class/autotasks.php - About 2 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Method 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);
    Severity: Minor
    Found in htdocs/modules/system/admin/autotasks/class/autotasks.php - About 1 hr to fix

      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;
      Severity: Minor
      Found in htdocs/modules/system/admin/autotasks/class/autotasks.php - About 1 hr to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Method 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) {
      Severity: Minor
      Found in htdocs/modules/system/admin/autotasks/class/autotasks.php - About 45 mins to fix

        Avoid too many return statements within this method.
        Open

                    return FALSE;
        Severity: Major
        Found in htdocs/modules/system/admin/autotasks/class/autotasks.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                  return TRUE;
          Severity: Major
          Found in htdocs/modules/system/admin/autotasks/class/autotasks.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                                return TRUE;
            Severity: Major
            Found in htdocs/modules/system/admin/autotasks/class/autotasks.php - About 30 mins to fix

              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);
              Severity: Minor
              Found in htdocs/modules/system/admin/autotasks/class/autotasks.php - About 25 mins to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              The method 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);

              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) {

              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();

              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" ));

              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));

              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);

              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) {

              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);

              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'"));

              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) {

              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);

              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) {

              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) {

              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.");
                          }

              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!');
                      }

              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));
                      }

              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);
                              }

              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'));
                      }

              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;
                      }

              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');
                      }

              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');
                      }

              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()) {

              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');

              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];

              Call to method __construct from undeclared class \icms_db_criteria_Compo
              Open

                      $criteria = new icms_db_criteria_Compo();

              Reference to undeclared class \icms_ipf_Object
              Open

                      parent::__construct($handler);

              Call to undeclared method \SystemAutoTasks::quickInitVar
              Open

                      $this->quickInitVar('sat_name', XOBJ_DTYPE_TXTBOX, TRUE, _CO_ICMS_AUTOTASKS_NAME, _CO_ICMS_AUTOTASKS_NAME_DSC);

              Call to undeclared method \SystemAutoTasks::setControl
              Open

                      $this->setControl('sat_enabled', 'yesno');

              Call to undeclared method \SystemAutoTasks::getVar
              Open

                      if ($this->getVar('sat_lastruntime') < 1) {

              Call to undeclared method \SystemAutoTasks::setVar
              Open

                          $this->setVar('sat_repeat', $count);

              Call to undeclared method \SystemAutoTasks::doHideFieldFromForm
              Open

                          $this->doHideFieldFromForm('sat_onfinish');

              Reference to undeclared class \icms_ipf_Object
              Open

                      return parent::getForm($form_caption, $form_name, $form_action, $submit_button_caption, $cancel_js_action, $captcha);

              Call to undeclared method \SystemAutoTasks::getVar
              Open

                      $type = $this->getVar('sat_type');

              Reference to undeclared class \icms_ipf_Handler
              Open

                      parent::__construct($db, 'autotasks', 'sat_id', 'sat_name', 'sat_code', 'system');

              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)));

              Call to undeclared method \SystemAutoTasks::getVar
              Open

                      $count = $this->getVar('sat_repeat');

              Call to undeclared method \SystemAutoTasks::setVar
              Open

                      $this->setVar('sat_lastruntime', time());

              Call to undeclared method \SystemAutoTasks::getVar
              Open

                      return $this->getVar('sat_name');

              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);

              Call to undeclared method \SystemAutoTasks::getVar
              Open

                      if ($this->getVar('sat_repeat') < 1) {

              Call to undeclared method \SystemAutoTasks::getVar
              Open

                      $int = $this->getVar('sat_interval');

              Reference to undeclared constant \_DAYS
              Open

                          $ret .= sprintf(_DAYS, $day) . ' ';

              Call to undeclared method \SystemAutoTasks::getVar
              Open

                              if ($this->getVar('sat_onfinish')) {

              Call to method setOrder from undeclared class \icms_db_criteria_Compo
              Open

                      $criteria->setOrder('ASC');

              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);

              Call to undeclared method \SystemAutoTasks::doHideFieldFromForm
              Open

                      $this->doHideFieldFromForm('sat_lastruntime');

              Reference to undeclared constant \_HOUR
              Open

                          $ret .= _HOUR . ' ';

              Call to method handler from undeclared class \icms
              Open

                          $module = icms::handler("icms_module")->getByDirname($dirname);

              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') {

              Call to undeclared method \SystemAutoTasks::doShowFieldOnForm
              Open

                          $this->doShowFieldOnForm('sat_code');

              Call to undeclared method \SystemAutoTasks::doShowFieldOnForm
              Open

                          $this->doShowFieldOnForm('sat_onfinish');

              Return type of getCurrentSystemHandler() is undeclared type \AutomatedTasks
              Open

                  public function getCurrentSystemHandler($forceUpdate = FALSE) {

              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" ));

              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);

              Call to undeclared method \SystemAutoTasks::quickInitVar
              Open

                      $this->quickInitVar('sat_type', XOBJ_DTYPE_TXTBOX, TRUE, _CO_ICMS_AUTOTASKS_TYPE, NULL, ':custom');

              Call to undeclared method \SystemAutoTasks::quickInitVar
              Open

                      $this->quickInitVar('sat_addon_id', XOBJ_DTYPE_INT, FALSE);

              Call to undeclared method \SystemAutoTasks::doHideFieldFromForm
              Open

                      $this->doHideFieldFromForm('sat_addon_id');

              Reference to undeclared constant \_YES
              Open

                      return ($this->getVar('sat_enabled')==1) ? _YES : _NO;

              Call to undeclared method \SystemAutoTasks::getVar
              Open

                      return ($this->getVar('sat_onfinish')==1) ? _YES : _NO;

              Call to undeclared method \SystemAutoTasks::getVar
              Open

                      if (!$this->getVar('sat_enabled')) return FALSE;

              Reference to undeclared property \SystemAutoTasks->handler
              Open

                      $this->handler->insert($this, TRUE);

              Call to method __construct from undeclared class \icms_db_criteria_Item
              Open

                      $criteria->add( new icms_db_criteria_Item('sat_repeat', 0, '>=', NULL, "'%s'"));

              Class extends undeclared class \icms_ipf_Object
              Open

              class SystemAutoTasks extends icms_ipf_Object {

              Call to undeclared method \SystemAutoTasks::quickInitVar
              Open

                      $this->quickInitVar('sat_id', XOBJ_DTYPE_INT, FALSE);

              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);

              Call to undeclared method \SystemAutoTasks::setControl
              Open

                      $this->setControl('sat_onfinish', 'yesno');

              Call to undeclared method \SystemAutoTasks::doHideFieldFromForm
              Open

                          $this->doHideFieldFromForm('sat_code');

              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

              Call to undeclared method \SystemAutoTasks::quickInitVar
              Open

                      $this->quickInitVar('sat_lastruntime', XOBJ_DTYPE_INT, FALSE, _CO_ICMS_AUTOTASKS_LASTRUNTIME, NULL, 0);

              Call to undeclared method \SystemAutoTasks::getVar
              Open

                          return formatTimestamp($this->getVar('sat_lastruntime'));

              Returning type array<int></int> but getType() is declared to return string
              Open

                      if ($part === NULL) return $type;

              Call to method getDeleteItemLink from undeclared class \icms_ipf_Controller
              Open

                      return $controller->getDeleteItemLink($this, FALSE, TRUE, FALSE);

              Call to method canRun from undeclared class \AutomatedTasks
              Open

                              if ($checkIfItIsAvaibleOnCurrentSystem && (!$handler->canRun())) {

              Reference to undeclared constant \XOBJ_DTYPE_TXTBOX
              Open

                      $this->quickInitVar('sat_type', XOBJ_DTYPE_TXTBOX, TRUE, _CO_ICMS_AUTOTASKS_TYPE, NULL, ':custom');

              Call to undeclared method \SystemAutoTasks::setControl
              Open

                      $this->setControl('sat_name', 'text');

              Call to undeclared method \SystemAutoTasks::getVar
              Open

                      if (((int) $this->getVar('sat_lastruntime') + (int) $this->getVar('sat_interval') * 60) > time()) return FALSE;

              Call to undeclared method \SystemAutotasksHandler::getObjects
              Open

                      $rez = $this->getObjects($criteria, FALSE);

              Call to method needExit from undeclared class \AutomatedTasks
              Open

                      return $this->getCurrentSystemHandler()->needExit();

              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);

              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);

              Call to undeclared method \SystemAutoTasks::getVar
              Open

                          return $this->getVar('sat_repeat');

              Reference to undeclared constant \_NO
              Open

                      return ($this->getVar('sat_enabled')==1) ? _YES : _NO;

              Reference to undeclared property \SystemAutoTasks->handler
              Open

                                  $this->handler->delete($this);

              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;

              Call to method add from undeclared class \icms_db_criteria_Compo
              Open

                      $criteria->add( new icms_db_criteria_Item('sat_repeat', 0, '>=', NULL, "'%s'"));

              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);

              Call to undeclared method \SystemAutoTasks::getVar
              Open

                      $code = $this->getVar('sat_code');

              Call to method __construct from undeclared class \icms_ipf_Controller
              Open

                      if ($controller === NULL) $controller = new icms_ipf_Controller($this->handler);

              Reference to undeclared property \SystemAutoTasks->handler
              Open

                      if ($controller === NULL) $controller = new icms_ipf_Controller($this->handler);

              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

              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);

              Call to undeclared method \SystemAutoTasks::quickInitVar
              Open

                      $this->quickInitVar('sat_code', XOBJ_DTYPE_SOURCE, TRUE, _CO_ICMS_AUTOTASKS_CODE, _CO_ICMS_AUTOTASKS_CODE_DSC);

              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);

              Reference to undeclared constant \XOBJ_DTYPE_INT
              Open

                      $this->quickInitVar('sat_addon_id', XOBJ_DTYPE_INT, FALSE);

              Call to undeclared method \SystemAutoTasks::doHideFieldFromForm
              Open

                      $this->doHideFieldFromForm('sat_type');

              Reference to undeclared constant \_DAY (Did you mean $day)
              Open

                          $ret .= _DAY . ' ';

              Call to undeclared method \SystemAutoTasks::getVar
              Open

                      return ($this->getVar('sat_enabled')==1) ? _YES : _NO;

              Call to undeclared method \SystemAutoTasks::getVar
              Open

                      if (substr($this->getVar('sat_type'), 0, 6) == 'addon/') {

              Call to undeclared method \SystemAutoTasks::setVar
              Open

                                  $this->setVar('sat_enabled', 0);

              Class extends undeclared class \icms_ipf_Handler
              Open

              class SystemAutotasksHandler extends icms_ipf_Handler {

              Call to method canRun from undeclared class \AutomatedTasks
              Open

                          if ($system->canRun()) {

              Call to method start from undeclared class \AutomatedTasks
              Open

                              $system->start($this->getRealTasksRunningTime());

              Reference to undeclared constant \XOBJ_DTYPE_INT
              Open

                      $this->quickInitVar('sat_id', XOBJ_DTYPE_INT, FALSE);

              Reference to undeclared constant \XOBJ_DTYPE_INT
              Open

                      $this->quickInitVar('sat_lastruntime', XOBJ_DTYPE_INT, FALSE, _CO_ICMS_AUTOTASKS_LASTRUNTIME, NULL, 0);

              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);

              Reference to undeclared constant \_HOURS
              Open

                          $ret .= sprintf(_HOURS, $hou) . ' ';

              Reference to undeclared constant \_MINUTE
              Open

                          $ret .= _MINUTE;

              Reference to undeclared constant \_MINUTES
              Open

                          $ret .= sprintf(_MINUTES, $min);

              Reference to undeclared constant \_NO
              Open

                      return ($this->getVar('sat_onfinish')==1) ? _YES : _NO;

              Reference to undeclared constant \_YES
              Open

                      return ($this->getVar('sat_onfinish')==1) ? _YES : _NO;

              Call to undeclared method \SystemAutoTasks::getVar
              Open

                          $dirname = substr($this->getVar('sat_type'), 6);

              Reference to undeclared property \SystemAutotasksHandler->db
              Open

                      if (!$result = $this->db->query($sql)) {

              Call to method __construct from undeclared class \icms_db_criteria_Item
              Open

                      $criteria->add( new icms_db_criteria_Item('sat_enabled', 1));

              Reference to undeclared property \SystemAutotasksHandler->db
              Open

                      $data = $this->db->fetchArray($result);

              Saw a token Phan may have failed to parse after '* @return Array(ConfigObjectItems)': after Array, saw '('
              Open

                   * @return Array(ConfigObjectItems)

              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

              Call to method needExecution from undeclared class \AutomatedTasks
              Open

                      return $this->getCurrentSystemHandler()->needExecution();

              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';

              Call to method handler from undeclared class \icms
              Open

                      $config_handler = icms::handler('icms_config');

              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

              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

              Call to method needStart from undeclared class \AutomatedTasks
              Open

                      if ($system->needStart()) {

              Reference to undeclared constant \ICMS_CONF_AUTOTASKS
              Open

                      $config_atasks = $config_handler->getConfigsByCat(ICMS_CONF_AUTOTASKS);

              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" ));

              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

              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

              Call to method add from undeclared class \icms_db_criteria_Compo
              Open

                      $criteria->add( new icms_db_criteria_Item('sat_enabled', 1));

              Suspicious array access to false
              Open

                              $ret[] = $name;

              Return type of getSelectedSystemHandler() is undeclared type \AutomatedTasks
              Open

                  public function getSelectedSystemHandler($name) {

              Call to method setSort from undeclared class \icms_db_criteria_Compo
              Open

                      $criteria->setSort('sat_lastruntime');

              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

              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) {

              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) {

              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 {

              Each class must be in a namespace of at least one level (a top-level vendor name)
              Open

              class SystemAutotasksHandler extends icms_ipf_Handler {

              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();
              
              

              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 {

              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 {

              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();
              
              

              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 {

              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 {

              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) {

              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 {

              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 {

              TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE"
              Open

                          if ($dirname == '') return FALSE;

              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) {

              TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE"
              Open

                      $this->quickInitVar('sat_id', XOBJ_DTYPE_INT, FALSE);

              TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
              Open

                      return $controller->getDeleteItemLink($this, FALSE, TRUE, FALSE);

              TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE"
              Open

                      return $controller->getDeleteItemLink($this, FALSE, TRUE, FALSE);

              TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
              Open

              icms_loadLanguageFile('system', 'autotasks', TRUE);

              TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
              Open

                                  return TRUE;

              TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE"
              Open

                      $this->_use_virtual_config = FALSE;

              TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL"
              Open

                      static $ret = NULL;

              TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
              Open

                      $this->handler->insert($this, TRUE);

              TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE"
              Open

                      static $handler = FALSE;

              TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
              Open

                      ignore_user_abort(TRUE);

              TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE"
              Open

                  private $_use_virtual_config = FALSE;

              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" ));

              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);

              TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE"
              Open

                      $this->quickInitVar('sat_addon_id', XOBJ_DTYPE_INT, FALSE);

              TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL"
              Open

                      static $controller = NULL;

              TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
              Open

                      return TRUE;

              TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE"
              Open

                      return $controller->getDeleteItemLink($this, FALSE, TRUE, FALSE);

              TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE"
              Open

                      if ($forceUpdate || ($handler === FALSE)) {

              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);

              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);

              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');

              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);

              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');

              TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
              Open

                          $is_bug = !(@highlight_string('<?' . 'php '. $code . ' return TRUE; ?' . '>', TRUE));

              TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE"
              Open

                      if (!$this->getVar('sat_enabled')) return FALSE;

              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) {

              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'"));

              TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE"
              Open

                  public function getCurrentSystemHandler($forceUpdate = FALSE) {

              TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE"
              Open

                  public $content = FALSE;

              TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL"
              Open

                  public function getType($part = NULL) {

              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;

              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) {

              TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE"
              Open

                      $rez = $this->getObjects($criteria, FALSE);

              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);

              TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL"
              Open

                      if ($part === NULL) return $type;

              TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
              Open

                          $is_bug = !(@highlight_string(file_get_contents($dirname), TRUE));

              TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL"
              Open

                      if ($controller === NULL) $controller = new icms_ipf_Controller($this->handler);

              The closing brace for the class must go on the next line after the body
              Open

              }

              TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE"
              Open

                          $ret = FALSE;

              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);

              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);

              TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE"
              Open

                          if ($module->getVar("isactive") != 1) return FALSE;

              TRUE, FALSE and NULL must be lowercase; expected "false" but found "FALSE"
              Open

                          return FALSE;

              TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
              Open

                      $this->_use_virtual_config = TRUE;

              TRUE, FALSE and NULL must be lowercase; expected "true" but found "TRUE"
              Open

                  public function getSystemHandlersList($checkIfItIsAvaibleOnCurrentSystem = TRUE) {

              TRUE, FALSE and NULL must be lowercase; expected "null" but found "NULL"
              Open

                      if ($ret === NULL) {

              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);

              Inline control structures are not allowed
              Open

                      if (((int) $this->getVar('sat_lastruntime') + (int) $this->getVar('sat_interval') * 60) > time()) return FALSE;

              Inline control structures are not allowed
              Open

                      if ($controller === NULL) $controller = new icms_ipf_Controller($this->handler);

              Inline control structures are not allowed
              Open

                      if (!($tasks = $this->getTasks())) return $rez;

              Inline control structures are not allowed
              Open

                              if (!$handler) continue;

              Inline control structures are not allowed
              Open

                          if ($module->getVar("isactive") != 1) return FALSE;

              Inline control structures are not allowed
              Open

                          if ($dirname == '') return FALSE;

              Inline control structures are not allowed
              Open

                      if ($this->getType(0) == 'addon') return;

              Inline control structures are not allowed
              Open

                      if (!$this->getVar('sat_enabled')) return FALSE;

              Inline control structures are not allowed
              Open

                      if ($part === NULL) return $type;

              Space after opening parenthesis of function call prohibited
              Open

                      $criteria->add( new icms_db_criteria_Item('sat_repeat', 0, '>=', NULL, "'%s'"));

              Space after opening parenthesis of function call prohibited
              Open

                      $criteria->add( new icms_db_criteria_Item('(sat_lastruntime + sat_interval)', time(), '<=', NULL, "%s" ));

              Space after opening parenthesis of function call prohibited
              Open

                      $criteria->add( new icms_db_criteria_Item('sat_enabled', 1));

              Expected 0 spaces before closing bracket; 1 found
              Open

                      $criteria->add( new icms_db_criteria_Item('(sat_lastruntime + sat_interval)', time(), '<=', NULL, "%s" ));

              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);

              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']);

              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 {

              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));

              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']);

              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);

              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);

              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);

              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));

              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);

              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 {

              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));

              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);

              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 {

              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 {

              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 {

              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);

              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

                          

              Unexpected trailing spaces found.
              Open

                          

              There are no issues that match your filters.

              Category
              Status