YetiForceCompany/YetiForceCRM

View on GitHub
modules/Settings/CronTasks/models/Record.php

Summary

Maintainability
B
4 hrs
Test Coverage
F
46%

The class Settings_CronTasks_Record_Model has an overall complexity of 52 which is very high. The configured complexity threshold is 50.
Open

class Settings_CronTasks_Record_Model extends Settings_Vtiger_Record_Model
{
    public static $STATUS_DISABLED = 0;
    public static $STATUS_ENABLED = 1;
    public static $STATUS_RUNNING = 2;

Method getDisplayValue has 43 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function getDisplayValue(string $key)
    {
        $fieldValue = $this->get($key);
        switch ($key) {
            case 'frequency':
Severity: Minor
Found in modules/Settings/CronTasks/models/Record.php - About 1 hr to fix

    Function getDisplayValue has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
    Open

        public function getDisplayValue(string $key)
        {
            $fieldValue = $this->get($key);
            switch ($key) {
                case 'frequency':
    Severity: Minor
    Found in modules/Settings/CronTasks/models/Record.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

    Function hadTimedout has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
    Open

        public function hadTimedout()
        {
            $maxTaskTime = $this->get('max_exe_time');
            $lastEnd = (int) $this->get('lastend');
            $lastStart = (int) $this->get('laststart');
    Severity: Minor
    Found in modules/Settings/CronTasks/models/Record.php - About 45 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 getDisplayValue() has a Cyclomatic Complexity of 12. The configured cyclomatic complexity threshold is 10.
    Open

        public function getDisplayValue(string $key)
        {
            $fieldValue = $this->get($key);
            switch ($key) {
                case 'frequency':

    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

    Reduce the number of returns of this function 4, down to the maximum allowed 3.
    Open

        public function hadTimedout()

    Having too many return statements in a function increases the function's essential complexity because the flow of execution is broken each time a return statement is encountered. This makes it harder to read and understand the logic of the function.

    Noncompliant Code Example

    With the default threshold of 3:

    function myFunction(){ // Noncompliant as there are 4 return statements
      if (condition1) {
        return true;
      } else {
        if (condition2) {
          return false;
        } else {
          return true;
        }
      }
      return false;
    }
    

    The class Settings_CronTasks_Record_Model has a coupling between objects value of 13. Consider to reduce the number of dependencies under 13.
    Open

    class Settings_CronTasks_Record_Model extends Settings_Vtiger_Record_Model
    {
        public static $STATUS_DISABLED = 0;
        public static $STATUS_ENABLED = 1;
        public static $STATUS_RUNNING = 2;

    CouplingBetweenObjects

    Since: 1.1.0

    A class with too many dependencies has negative impacts on several quality aspects of a class. This includes quality criteria like stability, maintainability and understandability

    Example

    class Foo {
        /**
         * @var \foo\bar\X
         */
        private $x = null;
    
        /**
         * @var \foo\bar\Y
         */
        private $y = null;
    
        /**
         * @var \foo\bar\Z
         */
        private $z = null;
    
        public function setFoo(\Foo $foo) {}
        public function setBar(\Bar $bar) {}
        public function setBaz(\Baz $baz) {}
    
        /**
         * @return \SplObjectStorage
         * @throws \OutOfRangeException
         * @throws \InvalidArgumentException
         * @throws \ErrorException
         */
        public function process(\Iterator $it) {}
    
        // ...
    }

    Source https://phpmd.org/rules/design.html#couplingbetweenobjects

    Missing class import via use statement (line '249', column '15').
    Open

            $row = (new \App\Db\Query())

    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 '266', column '17').
    Open

            $query = (new \App\Db\Query())

    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 '271', column '23').
    Open

                $moduleModel = new Settings_CronTasks_Module_Model();

    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 getDisplayValue uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
    Open

                    } else {
                        $fieldLabel = 'LBL_INACTIVE';
                    }

    ElseExpression

    Since: 1.4.0

    An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

    Example

    class Foo
    {
        public function bar($flag)
        {
            if ($flag) {
                // one branch
            } else {
                // another branch
            }
        }
    }

    Source https://phpmd.org/rules/cleancode.html#elseexpression

    Avoid using static access to class '\App\Language' in method 'getDisplayValue'.
    Open

                    $fieldValue = \App\Language::translate($fieldLabel, $moduleModel->getName(true));

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    The method getDuration uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
    Open

            } else {
                $duration = \App\Fields\RangeTime::displayElapseTime((int) $this->get('lastend') - $lastStart, 's', 's');
            }

    ElseExpression

    Since: 1.4.0

    An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

    Example

    class Foo
    {
        public function bar($flag)
        {
            if ($flag) {
                // one branch
            } else {
                // another branch
            }
        }
    }

    Source https://phpmd.org/rules/cleancode.html#elseexpression

    Avoid using static access to class '\App\Cron' in method 'hadTimedout'.
    Open

                if (time() > ($lastStart + \App\Cron::getMaxExecutionTime())) {

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    Avoid using static access to class '\App\Fields\DateTime' in method 'getDisplayValue'.
    Open

                        $fieldValue = \App\Fields\DateTime::formatToViewDate(date('Y-m-d H:i:s', $fieldValue));

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    The method getDisplayValue uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
    Open

                    } else {
                        $fieldValue = '';
                    }

    ElseExpression

    Since: 1.4.0

    An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

    Example

    class Foo
    {
        public function bar($flag)
        {
            if ($flag) {
                // one branch
            } else {
                // another branch
            }
        }
    }

    Source https://phpmd.org/rules/cleancode.html#elseexpression

    Avoid using static access to class 'Settings_Vtiger_Module_Model' in method 'getInstanceById'.
    Open

                $moduleModel = Settings_Vtiger_Module_Model::getInstance($qualifiedModuleName);

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    Avoid using static access to class 'App\Fields\DateTime' in method 'getLastEndDateTime'.
    Open

                $lastScannedTime = App\Fields\DateTime::formatToDisplay(date('Y-m-d H:i:s', $this->get('lastend')));

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    Avoid using static access to class '\App\Language' in method 'getDisplayValue'.
    Open

                    $fieldValue = \App\Language::translate($fieldValue, $this->getModule()->getName(true));

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    Avoid using static access to class 'Vtiger_Loader' in method 'getInstanceById'.
    Open

                $recordModelClass = Vtiger_Loader::getComponentClassName('Model', 'Record', $qualifiedModuleName);

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    Avoid using static access to class '\App\Purifier' in method 'getDisplayValue'.
    Open

                    $fieldValue = \App\Purifier::encodeHtml($fieldValue);

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    Avoid using static access to class '\App\Fields\RangeTime' in method 'getDuration'.
    Open

                $duration = \App\Fields\RangeTime::displayElapseTime((int) $this->get('lastend') - $lastStart, 's', 's');

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    Avoid using static access to class 'Vtiger_Link_Model' in method 'getRecordLinks'.
    Open

                $links[] = Vtiger_Link_Model::getInstanceFromValues($recordLink);

    StaticAccess

    Since: 1.4.0

    Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

    Example

    class Foo
    {
        public function bar()
        {
            Bar::baz();
        }
    }

    Source https://phpmd.org/rules/cleancode.html#staticaccess

    Avoid using static access to class 'App\Config' in method 'getMinimumFrequency'.
    Open

            $frequency = App\Config::main('MINIMUM_CRON_FREQUENCY');

    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

    Define a constant instead of duplicating this literal "lastend" 6 times.
    Open

            $lastEnd = (int) $this->get('lastend');

    Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

    On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

    Noncompliant Code Example

    With the default threshold of 3:

    function run() {
      prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
      execute('action1');
      release('action1');
    }
    

    Compliant Solution

    ACTION_1 = 'action1';
    
    function run() {
      prepare(ACTION_1);
      execute(ACTION_1);
      release(ACTION_1);
    }
    

    Exceptions

    To prevent generating some false-positives, literals having less than 5 characters are excluded.

    Define a constant instead of duplicating this literal "laststart" 4 times.
    Open

            $lastStart = (int) $this->get('laststart');

    Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

    On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

    Noncompliant Code Example

    With the default threshold of 3:

    function run() {
      prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
      execute('action1');
      release('action1');
    }
    

    Compliant Solution

    ACTION_1 = 'action1';
    
    function run() {
      prepare(ACTION_1);
      execute(ACTION_1);
      release(ACTION_1);
    }
    

    Exceptions

    To prevent generating some false-positives, literals having less than 5 characters are excluded.

    Define a constant instead of duplicating this literal "vtiger_cron_task" 3 times.
    Open

            \App\Db::getInstance()->createCommand()->update('vtiger_cron_task', ['frequency' => $this->get('frequency'), 'status' => $this->get('status')], ['id' => $this->getId()])

    Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

    On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

    Noncompliant Code Example

    With the default threshold of 3:

    function run() {
      prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
      execute('action1');
      release('action1');
    }
    

    Compliant Solution

    ACTION_1 = 'action1';
    
    function run() {
      prepare(ACTION_1);
      execute(ACTION_1);
      release(ACTION_1);
    }
    

    Exceptions

    To prevent generating some false-positives, literals having less than 5 characters are excluded.

    Define a constant instead of duplicating this literal "status" 7 times.
    Open

            if ($this->get('status') == self::$STATUS_DISABLED) {

    Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

    On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

    Noncompliant Code Example

    With the default threshold of 3:

    function run() {
      prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
      execute('action1');
      release('action1');
    }
    

    Compliant Solution

    ACTION_1 = 'action1';
    
    function run() {
      prepare(ACTION_1);
      execute(ACTION_1);
      release(ACTION_1);
    }
    

    Exceptions

    To prevent generating some false-positives, literals having less than 5 characters are excluded.

    Define a constant instead of duplicating this literal "frequency" 3 times.
    Open

                case 'frequency':

    Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

    On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

    Noncompliant Code Example

    With the default threshold of 3:

    function run() {
      prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
      execute('action1');
      release('action1');
    }
    

    Compliant Solution

    ACTION_1 = 'action1';
    
    function run() {
      prepare(ACTION_1);
      execute(ACTION_1);
      release(ACTION_1);
    }
    

    Exceptions

    To prevent generating some false-positives, literals having less than 5 characters are excluded.

    Saw unextractable annotation for comment '* @return <type>'</type>
    Open

         * @return <type>

    Argument 3 (pad_string) is 0 but \str_pad() takes string
    Open

                    $hours = str_pad((int) (($fieldValue / (60 * 60))), 2, 0, STR_PAD_LEFT);

    Saw unextractable annotation for comment '* @param <integer> $recordId'</integer>
    Open

         * @param <Integer> $recordId

    Call to undeclared method \App\Db\Query::from
    Open

            $query = (new \App\Db\Query())

    Reference to undeclared property \Settings_CronTasks_Record_Model->module
    Open

            $this->module = $moduleModel;

    Saw unextractable annotation for comment '* @return <integer> id'</integer>
    Open

         * @return <Integer> id

    Argument 1 (input) is int but \str_pad() takes string
    Open

                    $minutes = str_pad((int) (($fieldValue % (60 * 60)) / 60), 2, 0, STR_PAD_LEFT);

    Argument 1 (input) is int but \str_pad() takes string
    Open

                    $hours = str_pad((int) (($fieldValue / (60 * 60))), 2, 0, STR_PAD_LEFT);

    Reference to undeclared property \Settings_CronTasks_Record_Model->module
    Open

            return $this->module;

    Saw unextractable annotation for comment '* @param <settings_crontasks_module_model> $moduleModel'</settings_crontasks_module_model>
    Open

         * @param <Settings_CronTasks_Module_Model> $moduleModel

    Saw unextractable annotation for comment '* @return <settings_crontasks_record_model> record model'</settings_crontasks_record_model>
    Open

         * @return <Settings_CronTasks_Record_Model> record model

    Call to undeclared method \App\Db\Query::from
    Open

            $row = (new \App\Db\Query())

    Call to undeclared method \App\Db::createCommand
    Open

            \App\Db::getInstance()->createCommand()->update('vtiger_cron_task', ['frequency' => $this->get('frequency'), 'status' => $this->get('status')], ['id' => $this->getId()])

    Saw unextractable annotation for comment '* @return <settings_crontasks_record_model> RecordModel'</settings_crontasks_record_model>
    Open

         * @return <Settings_CronTasks_Record_Model> RecordModel

    Argument 3 (pad_string) is 0 but \str_pad() takes string
    Open

                    $minutes = str_pad((int) (($fieldValue % (60 * 60)) / 60), 2, 0, STR_PAD_LEFT);

    Call to method getCurrentUserModel from undeclared class \App\User (Did you mean class \Tests\App\User)
    Open

                $hourFormat = \App\User::getCurrentUserModel()->getDetail('hour_format');

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

    class Settings_CronTasks_Record_Model extends Settings_Vtiger_Record_Model

    The property $STATUS_COMPLETED is not named in camelCase.
    Open

    class Settings_CronTasks_Record_Model extends Settings_Vtiger_Record_Model
    {
        public static $STATUS_DISABLED = 0;
        public static $STATUS_ENABLED = 1;
        public static $STATUS_RUNNING = 2;

    CamelCasePropertyName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name attributes.

    Example

    class ClassName {
        protected $property_name;
    }

    Source

    The property $STATUS_DISABLED is not named in camelCase.
    Open

    class Settings_CronTasks_Record_Model extends Settings_Vtiger_Record_Model
    {
        public static $STATUS_DISABLED = 0;
        public static $STATUS_ENABLED = 1;
        public static $STATUS_RUNNING = 2;

    CamelCasePropertyName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name attributes.

    Example

    class ClassName {
        protected $property_name;
    }

    Source

    The property $STATUS_ENABLED is not named in camelCase.
    Open

    class Settings_CronTasks_Record_Model extends Settings_Vtiger_Record_Model
    {
        public static $STATUS_DISABLED = 0;
        public static $STATUS_ENABLED = 1;
        public static $STATUS_RUNNING = 2;

    CamelCasePropertyName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name attributes.

    Example

    class ClassName {
        protected $property_name;
    }

    Source

    The class Settings_CronTasks_Record_Model is not named in CamelCase.
    Open

    class Settings_CronTasks_Record_Model extends Settings_Vtiger_Record_Model
    {
        public static $STATUS_DISABLED = 0;
        public static $STATUS_ENABLED = 1;
        public static $STATUS_RUNNING = 2;

    CamelCaseClassName

    Since: 0.2

    It is considered best practice to use the CamelCase notation to name classes.

    Example

    class class_name {
    }

    Source

    The property $STATUS_RUNNING is not named in camelCase.
    Open

    class Settings_CronTasks_Record_Model extends Settings_Vtiger_Record_Model
    {
        public static $STATUS_DISABLED = 0;
        public static $STATUS_ENABLED = 1;
        public static $STATUS_RUNNING = 2;

    CamelCasePropertyName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name attributes.

    Example

    class ClassName {
        protected $property_name;
    }

    Source

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public static $STATUS_COMPLETED = 3;

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function setModule($moduleModel)

    Spaces must be used to indent lines; tabs are not allowed
    Open

            if ($this->get('status') == self::$STATUS_RUNNING) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }

    Spaces must be used to indent lines; tabs are not allowed
    Open

                return $dateTimeList[0] . ' ' . date('g:i:sa', strtotime($dateTimeList[1]));

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return int seconds

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

            if ($lastEnd < $lastStart && !$this->isRunning()) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

                }

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Get Time taken to complete task.

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function getId()

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return false;

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function hadTimedout()

    Spaces must be used to indent lines; tabs are not allowed
    Open

                return true;

    Spaces must be used to indent lines; tabs are not allowed
    Open

                }

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return <type>

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $this->module = $moduleModel;

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function isEnabled()

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

            if (null !== $this->get('lastend')) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return string duration string or 'running','timeout'

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $duration = '-';

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return $this->get('name');

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Function to set module to this record instance.

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @param <Settings_CronTasks_Module_Model> $moduleModel

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return false;

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $duration = \App\Fields\RangeTime::displayElapseTime((int) $this->get('lastend') - $lastStart, 's', 's');

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return false;

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Get cron operation duration.

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

            if (!$lastStart) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

                return true;

    Spaces must be used to indent lines; tabs are not allowed
    Open

            if ($this->get('status') == self::$STATUS_ENABLED) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $hourFormat = \App\User::getCurrentUserModel()->getDetail('hour_format');

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function getModule()

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function isCompleted()

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public static $STATUS_DISABLED = 0;

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Function to get Name of this record.

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return string

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return false;

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return bool

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $maxTaskTime = $this->get('max_exe_time');

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function getLastEndDateTime()

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function getDuration()

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public static $STATUS_ENABLED = 1;

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Get the user datetimefeild.

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

                if ('24' == $hourFormat) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return $this;

    Spaces must be used to indent lines; tabs are not allowed
    Open

                return true;

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $duration = 'timeout';

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

                return true;

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    return $lastScannedTime;

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return '';

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $duration = 'running';

    Spaces must be used to indent lines; tabs are not allowed
    Open

            } elseif ($this->hadTimedout()) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return <Integer> id

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Function to get module instance of this record.

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }

    Spaces must be used to indent lines; tabs are not allowed
    Open

                if (time() > ($lastStart + \App\Cron::getMaxExecutionTime())) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return false;

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function getName()

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

            if ($this->get('status') == self::$STATUS_DISABLED) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

                return true;

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Detect if the task was started and never finished.

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $lastStart = (int) $this->get('laststart');

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Function to get Id of this record instance.

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function getTimeDiff()

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return <Settings_CronTasks_Record_Model> record model

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

                if (!empty($maxTaskTime) && time() > ($lastStart + ($maxTaskTime * 60))) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $lastStart = (int) $this->get('laststart');

    Spaces must be used to indent lines; tabs are not allowed
    Open

            } elseif ($this->isRunning() && !$this->hadTimedout()) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function isDisabled()

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function isRunning()

    Spaces must be used to indent lines; tabs are not allowed
    Open

            if ($lastEnd < $lastStart && $this->isRunning()) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    return true;

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    return true;

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $lastScannedTime = App\Fields\DateTime::formatToDisplay(date('Y-m-d H:i:s', $this->get('lastend')));

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $dateTimeList = explode(' ', $lastScannedTime);

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public static $STATUS_RUNNING = 2;

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return (int) ($this->get('lastend')) - (int) ($this->get('laststart'));

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return $this->get('id');

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return $this->module;

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

            if ($this->get('status') == self::$STATUS_COMPLETED) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $lastEnd = (int) $this->get('lastend');

    Spaces must be used to indent lines; tabs are not allowed
    Open

                }

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

            } else {

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    $fieldValue = (int) $fieldValue;

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    } else {

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    } else {

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function getEditViewUrl()

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $recordModel = new $recordModelClass();

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return false;

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function getRecordLinks(): array

    Spaces must be used to indent lines; tabs are not allowed
    Open

            ];

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function getMinimumFrequency()

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return $duration;

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        $fieldLabel = 'LBL_COMPLETED';

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

            foreach ($recordLinks as $recordLink) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

                return $frequency * 60;

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function getDisplayValue(string $key)

    Spaces must be used to indent lines; tabs are not allowed
    Open

                case 'frequency':

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    $fieldValue = (int) $fieldValue;

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return 'module=CronTasks&parent=Settings&view=EditAjax&record=' . $this->getId();

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

                ],

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Spaces must be used to indent lines; tabs are not allowed
    Open

            switch ($key) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

            \App\Db::getInstance()->createCommand()->update('vtiger_cron_task', ['frequency' => $this->get('frequency'), 'status' => $this->get('status')], ['id' => $this->getId()])

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'linkurl' => "javascript:Settings_CronTasks_List_Js.triggerEditEvent('" . $this->getEditViewUrl() . "')",

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    $minutes = str_pad((int) (($fieldValue % (60 * 60)) / 60), 2, 0, STR_PAD_LEFT);

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    } elseif ($fieldValue === self::$STATUS_RUNNING) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $moduleModel = new Settings_CronTasks_Module_Model();

    Spaces must be used to indent lines; tabs are not allowed
    Open

                [

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    $fieldValue = \App\Language::translate($fieldLabel, $moduleModel->getName(true));

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    $fieldValue = (int) $fieldValue;

    Spaces must be used to indent lines; tabs are not allowed
    Open

                case 'name':

    Spaces must be used to indent lines; tabs are not allowed
    Open

                ->execute();

    Spaces must be used to indent lines; tabs are not allowed
    Open

            if (empty($recordId)) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $row = (new \App\Db\Query())

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

                ->from('vtiger_cron_task')

    Spaces must be used to indent lines; tabs are not allowed
    Open

                ->where(['name' => $name]);

    Spaces must be used to indent lines; tabs are not allowed
    Open

            if ($row) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $recordModel = new self();

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'linklabel' => 'LBL_EDIT_RECORD',

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return string

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        $fieldLabel = 'LBL_INACTIVE';

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    if ($fieldValue) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

                case 'duration':

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return $fieldValue;

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

        // Function to get Edit view url

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    break;

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

                case 'status':

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    if ($fieldValue === self::$STATUS_COMPLETED) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public static function getInstanceById($recordId, $qualifiedModuleName)

    Spaces must be used to indent lines; tabs are not allowed
    Open

                case 'laststart':

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }

    Spaces must be used to indent lines; tabs are not allowed
    Open

                return false;

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'linktype' => 'LISTVIEWRECORD',

    Spaces must be used to indent lines; tabs are not allowed
    Open

                return $recordModel;

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public static function getInstanceByName($name)

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return false;

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    $moduleModel = $this->getModule();

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        $fieldValue = '';

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @param string $key

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

            if ($row) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $moduleModel = Settings_Vtiger_Module_Model::getInstance($qualifiedModuleName);

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $row = $query->createCommand()->queryOne();

    Spaces must be used to indent lines; tabs are not allowed
    Open

                return $recordModel;

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $links[] = Vtiger_Link_Model::getInstanceFromValues($recordLink);

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    break;

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    }

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    break;

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    break;

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

                ->where(['id' => $recordId])

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        $fieldValue = \App\Fields\DateTime::formatToViewDate(date('Y-m-d H:i:s', $fieldValue));

    Spaces must be used to indent lines; tabs are not allowed
    Open

                default:

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    $fieldValue = \App\Purifier::encodeHtml($fieldValue);

    Spaces must be used to indent lines; tabs are not allowed
    Open

        public function save()

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Function to get record instance by using id and moduleName.

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

                ->one();

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $recordModel->setData($row)->setModule($moduleModel);

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    'linkicon' => 'yfi yfi-full-editing-view',

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return $links;

    Spaces must be used to indent lines; tabs are not allowed
    Open

            if (!empty($frequency)) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    $fieldValue = $hours . ':' . $minutes;

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        $fieldLabel = 'LBL_RUNNING';

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    } elseif ($fieldValue === self::$STATUS_ENABLED) {

    Spaces must be used to indent lines; tabs are not allowed
    Open

                        $fieldLabel = 'LBL_ACTIVE';

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    break;

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    $fieldValue = $this->getDuration();

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Function to save the record.

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @param string    $qualifiedModuleName

    Spaces must be used to indent lines; tabs are not allowed
    Open

                ->from('vtiger_cron_task')

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /** {@inheritdoc} */

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $recordLinks = [

    Spaces must be used to indent lines; tabs are not allowed
    Open

        {

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $frequency = App\Config::main('MINIMUM_CRON_FREQUENCY');

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * Function to get display value of every field from this record.

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $fieldValue = $this->get($key);

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    }

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    $fieldValue = \App\Language::translate($fieldValue, $this->getModule()->getName(true));

    Spaces must be used to indent lines; tabs are not allowed
    Open

                case 'last_update':

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    break;

    Spaces must be used to indent lines; tabs are not allowed
    Open

                case 'lastend':

    Spaces must be used to indent lines; tabs are not allowed
    Open

        /**

    Line exceeds 120 characters; contains 177 characters
    Open

            \App\Db::getInstance()->createCommand()->update('vtiger_cron_task', ['frequency' => $this->get('frequency'), 'status' => $this->get('status')], ['id' => $this->getId()])

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @return <Settings_CronTasks_Record_Model> RecordModel

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $recordModelClass = Vtiger_Loader::getComponentClassName('Model', 'Record', $qualifiedModuleName);

    Spaces must be used to indent lines; tabs are not allowed
    Open

         */

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $query = (new \App\Db\Query())

    Spaces must be used to indent lines; tabs are not allowed
    Open

                $recordModel->setData($row)->setModule($moduleModel);

    Line exceeds 120 characters; contains 121 characters
    Open

                    'linkurl' => "javascript:Settings_CronTasks_List_Js.triggerEditEvent('" . $this->getEditViewUrl() . "')",

    Spaces must be used to indent lines; tabs are not allowed
    Open

            }

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

         *

    Spaces must be used to indent lines; tabs are not allowed
    Open

                    $hours = str_pad((int) (($fieldValue / (60 * 60))), 2, 0, STR_PAD_LEFT);

    Spaces must be used to indent lines; tabs are not allowed
    Open

        }

    Spaces must be used to indent lines; tabs are not allowed
    Open

         * @param <Integer> $recordId

    Spaces must be used to indent lines; tabs are not allowed
    Open

            $links = [];

    Spaces must be used to indent lines; tabs are not allowed
    Open

            return 60;

    Class name "Settings_CronTasks_Record_Model" is not in camel caps format
    Open

    class Settings_CronTasks_Record_Model extends Settings_Vtiger_Record_Model

    There are no issues that match your filters.

    Category
    Status