YetiForceCompany/YetiForceCRM

View on GitHub
modules/Settings/Workflows/actions/Save.php

Summary

Maintainability
B
5 hrs
Test Coverage
F
0%

Method process has 74 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function process(App\Request $request)
    {
        $summary = $request->get('summary');
        $moduleName = $request->getByType('module_name', 2);
        $conditions = $request->getArray('conditions', 'Text');
Severity: Major
Found in modules/Settings/Workflows/actions/Save.php - About 2 hrs to fix

    Function process has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
    Open

        public function process(App\Request $request)
        {
            $summary = $request->get('summary');
            $moduleName = $request->getByType('module_name', 2);
            $conditions = $request->getArray('conditions', 'Text');
    Severity: Minor
    Found in modules/Settings/Workflows/actions/Save.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

    The method process() has an NPath complexity of 1296. The configured NPath complexity threshold is 200.
    Open

        public function process(App\Request $request)
        {
            $summary = $request->get('summary');
            $moduleName = $request->getByType('module_name', 2);
            $conditions = $request->getArray('conditions', 'Text');

    NPathComplexity

    Since: 0.1

    The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

    Example

    class Foo {
        function bar() {
            // lots of complicated code
        }
    }

    Source https://phpmd.org/rules/codesize.html#npathcomplexity

    The method process() has a Cyclomatic Complexity of 17. The configured cyclomatic complexity threshold is 10.
    Open

        public function process(App\Request $request)
        {
            $summary = $request->get('summary');
            $moduleName = $request->getByType('module_name', 2);
            $conditions = $request->getArray('conditions', 'Text');

    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

    Refactor this function to reduce its Cognitive Complexity from 24 to the 15 allowed.
    Open

        public function process(App\Request $request)

    Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

    See

    Missing class import via use statement (line '28', column '19').
    Open

            $response = new Vtiger_Response();

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

            } else {
                $workflowModel = Settings_Workflows_Record_Model::getInstance($request->getInteger('record'));
            }

    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_Workflows_Record_Model' in method 'process'.
    Open

                $workflowModel = Settings_Workflows_Record_Model::getCleanInstance($moduleName);

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

                    } else {
                        $workflowModel->set('nexttrigger_time', date('Y-m-d H:i:s', strtotime('+10 year')));
                    }

    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\Json' in method 'process'.
    Open

                    $annualDates = \App\Json::encode([$date]);

    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\Json' in method 'process'.
    Open

                $workflowModel->set('params', empty($params) ? null : \App\Json::encode($params));

    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 'Settings_Workflows_Record_Model' in method 'process'.
    Open

                $workflowModel = Settings_Workflows_Record_Model::getInstance($request->getInteger('record'));

    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_Util_Helper' in method 'process'.
    Open

                    $currentTime = Vtiger_Util_Helper::getActiveAdminCurrentDateTime();

    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\Json' in method 'process'.
    Open

                    $annualDates = \App\Json::encode($dates);

    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\Json' in method 'process'.
    Open

                    $dayOfWeek = \App\Json::encode($request->getArray('schdayofweek', 'Integer'));

    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\Json' in method 'process'.
    Open

                    $dayOfMonth = \App\Json::encode($request->getArray('schdayofmonth', 'Integer'));

    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 'process'.
    Open

                    $date = \App\Fields\DateTime::formatToDb($date);

    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\Json' in method 'process'.
    Open

                $workflowModel->set('params', empty($params) ? null : \App\Json::encode($params));

    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 "schtime" 3 times.
    Open

                if (!$request->isEmpty('schtime')) {

    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 "params" 5 times.
    Open

            $workflowModel->set('params', null);

    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 "iterationOff" 3 times.
    Open

                    'iterationOff' => \App\Purifier::BOOL,

    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 "schtypeid" 3 times.
    Open

            $workflowScheduleType = $request->isEmpty('schtypeid') ? null : $request->getInteger('schtypeid');

    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 "showTasks" 3 times.
    Open

                    'showTasks' => \App\Purifier::BOOL,

    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 "enableTasks" 3 times.
    Open

                    'enableTasks' => \App\Purifier::BOOL,

    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 "filtersavedinnew" 3 times.
    Open

            $filterSavedInNew = $request->isEmpty('filtersavedinnew') ? null : $request->getInteger('filtersavedinnew');

    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.

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

    class Settings_Workflows_Save_Action extends Settings_Vtiger_Basic_Action

    The class Settings_Workflows_Save_Action is not named in CamelCase.
    Open

    class Settings_Workflows_Save_Action extends Settings_Vtiger_Basic_Action
    {
        /** {@inheritdoc} */
        public function process(App\Request $request)
        {

    CamelCaseClassName

    Since: 0.2

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

    Example

    class class_name {
    }

    Source

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

        {

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

            $filterSavedInNew = $request->isEmpty('filtersavedinnew') ? null : $request->getInteger('filtersavedinnew');

    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

        public function process(App\Request $request)

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

                    }

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

                $workflowModel->set('params', empty($params) ? null : \App\Json::encode($params));

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

            }

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

            //Update only for scheduled workflows other than specific date

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

                } elseif ($workflowScheduleType == Workflow::$SCHEDULED_ON_SPECIFIC_DATE) {

    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

            $summary = $request->get('summary');

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

            $executionCondition = $request->getInteger('execution_condition');

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

            }

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

                $dayOfMonth = null;

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

                if ($workflowScheduleType == Workflow::$SCHEDULED_WEEKLY) {

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

                    $dayOfMonth = \App\Json::encode($request->getArray('schdayofmonth', 'Integer'));

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

                    $dates = array_map('App\Fields\Date::formatToDB', $dates);

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

            $workflowModel->save();

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

                    $schtime = $request->getByType('schtime', 'TimeInUserFormat', true);

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

                    $annualDates = \App\Json::encode($dates);

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

                    'enableTasks' => \App\Purifier::BOOL,

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

                $workflowModel->set('schdayofmonth', $dayOfMonth);

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

            $workflowScheduleType = $request->isEmpty('schtypeid') ? null : $request->getInteger('schtypeid');

    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

                $workflowModel = Settings_Workflows_Record_Model::getInstance($request->getInteger('record'));

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

                $workflowModel->set('schtime', $schtime);

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

                    $date = \App\Fields\DateTime::formatToDb($date);

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

                    sort($dates);

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

            $workflowModel->set('filtersavedinnew', $filterSavedInNew);

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

            $response = new Vtiger_Response();

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

            $workflowModel->set('execution_condition', $executionCondition);

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

                    $dayOfWeek = \App\Json::encode($request->getArray('schdayofweek', 'Integer'));

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

                    'iterationOff' => \App\Purifier::BOOL,

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

                $workflowModel->set('params', empty($params) ? null : \App\Json::encode($params));

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

            $workflowModel->set('conditions', $conditions);

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

                $dayOfWeek = null;

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

            $moduleName = $request->getByType('module_name', 2);

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

            $conditions = $request->getArray('conditions', 'Text');

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

            if ($request->isEmpty('record')) {

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

            $workflowModel->set('summary', $summary);

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

            $workflowModel->set('params', null);

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

                $annualDates = null;

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

                        $workflowModel->set('nexttrigger_time', $date);

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

                    $annualDates = \App\Json::encode([$date]);

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

                ]), array_flip(['showTasks', 'enableTasks']));

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

            // Added to save the condition only when its changed from vtiger6

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

        }

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

            $workflowModel->set('module_name', $moduleName);

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

                $workflowModel->set('schtypeid', $workflowScheduleType);

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

                    $date = $request->getByType('schdate', 'dateTimeInUserFormat', true);

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

            } elseif (\VTWorkflowManager::$TRIGGER === $executionCondition) {

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

                    'showTasks' => \App\Purifier::BOOL,

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

            }

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

                    'enableTasks' => \App\Purifier::BOOL,

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

            if ($workflowScheduleType != Workflow::$SCHEDULED_ON_SPECIFIC_DATE && '6' == $executionCondition) {

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

                $workflowModel->transformAdvanceFilterToWorkFlowFilter();

    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

                    $dates = $request->getExploded('schannualdates', ',', 'DateInUserFormat');

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

                $workflowModel->updateNextTriggerTime();

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

                    $currentTime = Vtiger_Util_Helper::getActiveAdminCurrentDateTime();

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

                        $workflowModel->set('nexttrigger_time', date('Y-m-d H:i:s', strtotime('+10 year')));

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

                } elseif ($workflowScheduleType == Workflow::$SCHEDULED_ANNUALLY) {

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

                $params = array_intersect_key($request->getMultiDimensionArray('params', [

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

                $workflowModel->set('schdayofweek', $dayOfWeek);

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

                $workflowModel->set('schannualdates', $annualDates);

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

                    'iterationOff' => \App\Purifier::BOOL,

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

            if (6 === $filterSavedInNew) {

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

                //Added to change advanced filter condition to workflow

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

                $schtime = null;

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

                    if ($date > $currentTime) {

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

                }

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

                $params = array_intersect_key($request->getMultiDimensionArray('params', [

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

            $response->setResult(['id' => $workflowModel->get('workflow_id')]);

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

            $response->emit();

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

                } elseif ($workflowScheduleType == Workflow::$SCHEDULED_MONTHLY_BY_DATE) {

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

                ]), array_flip(['iterationOff']));

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

                $workflowModel = Settings_Workflows_Record_Model::getCleanInstance($moduleName);

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

            if (\VTWorkflowManager::$ON_SCHEDULE === $executionCondition) {

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

                if (!$request->isEmpty('schtime')) {

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

                    'showTasks' => \App\Purifier::BOOL,

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

    class Settings_Workflows_Save_Action extends Settings_Vtiger_Basic_Action

    There are no issues that match your filters.

    Category
    Status