YetiForceCompany/YetiForceCRM

View on GitHub
modules/Settings/Workflows/views/Edit.php

Summary

Maintainability
C
1 day
Test Coverage
F
0%

Method step2 has 76 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function step2(App\Request $request)
    {
        $viewer = $this->getViewer($request);
        $moduleName = $request->getModule();
        $qualifiedModuleName = $request->getModule(false);
Severity: Major
Found in modules/Settings/Workflows/views/Edit.php - About 3 hrs to fix

    Function step2 has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
    Open

        public function step2(App\Request $request)
        {
            $viewer = $this->getViewer($request);
            $moduleName = $request->getModule();
            $qualifiedModuleName = $request->getModule(false);
    Severity: Minor
    Found in modules/Settings/Workflows/views/Edit.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 step1 has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function step1(App\Request $request)
        {
            $viewer = $this->getViewer($request);
            $moduleName = $request->getModule();
            $qualifiedModuleName = $request->getModule(false);
    Severity: Minor
    Found in modules/Settings/Workflows/views/Edit.php - About 1 hr to fix

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

          public function step2(App\Request $request)
          {
              $viewer = $this->getViewer($request);
              $moduleName = $request->getModule();
              $qualifiedModuleName = $request->getModule(false);

      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 30 to the 15 allowed.
      Open

          public function step2(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

      The method preProcess has a boolean flag argument $display, which is a certain sign of a Single Responsibility Principle violation.
      Open

          public function preProcess(App\Request $request, $display = 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

      Avoid using static access to class 'Vtiger_Module_Model' in method 'step2'.
      Open

                  $selectedModule = Vtiger_Module_Model::getInstance($selectedModuleName);

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

                  $workflowModel = Settings_Workflows_Record_Model::getInstance($recordId);

      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_Field_Model' in method 'step2'.
      Open

              $viewer->assign('ADVANCED_FILTER_OPTIONS', Settings_Workflows_Field_Model::getAdvancedFilterOptions());

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

                  $workFlowModel = Settings_Workflows_Record_Model::getCleanInstance($selectedModuleName);

      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_AdvancedFilter_Helper' in method 'step2'.
      Open

              $viewer->assign('DATE_FILTERS', Vtiger_AdvancedFilter_Helper::getDateFilter($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 'Settings_Workflows_RecordStructure_Model' in method 'step2'.
      Open

              $recordStructureInstance = Settings_Workflows_RecordStructure_Model::getInstanceForWorkFlowModule($workFlowModel, Settings_Workflows_RecordStructure_Model::RECORD_STRUCTURE_MODE_FILTER);

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

                  $workFlowModel = Settings_Workflows_Record_Model::getInstance($recordId);

      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 'step1'.
      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

      Avoid using static access to class 'Settings_Workflows_Module_Model' in method 'step1'.
      Open

              $viewer->assign('ALL_MODULES', Settings_Workflows_Module_Model::getSupportedModules());

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

              } else {
                  $selectedModuleName = $request->getByType('module_name', 2);
                  $selectedModule = Vtiger_Module_Model::getInstance($selectedModuleName);
                  $workFlowModel = Settings_Workflows_Record_Model::getCleanInstance($selectedModuleName);
              }

      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 step1 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::getCleanInstance($moduleName);
                  $selectedModule = $request->getByType('source_module', 2);
                  if (!empty($selectedModule)) {
                      $viewer->assign('SELECTED_MODULE', $selectedModule);

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

                              $value = \App\Json::encode($value);

      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_Module_Model' in method 'step2'.
      Open

              $viewer->assign('FIELD_EXPRESSIONS', Settings_Workflows_Module_Model::getExpressions());

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

              } else {
                  $viewer->assign('ADVANCE_CRITERIA', '');
              }

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

                  $workFlowModel = Settings_Workflows_Record_Model::getCleanInstance($selectedModuleName);

      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 {
                  $this->step1($request);
              }

      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 'Users' in method 'step1'.
      Open

              $admin = Users::getActiveAdminUser();

      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_Field_Model' in method 'step2'.
      Open

              $viewer->assign('ADVANCED_FILTER_OPTIONS_BY_TYPE', Settings_Workflows_Field_Model::getAdvancedFilterOpsByFieldType());

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

                  $workflowModel = Settings_Workflows_Record_Model::getInstance($recordId);

      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_Module_Model' in method 'step1'.
      Open

              $viewer->assign('TRIGGER_TYPES', Settings_Workflows_Module_Model::getTriggerTypes());

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

              } else {
                  $selectedModuleName = $request->getByType('module_name', 2);
                  $workFlowModel = Settings_Workflows_Record_Model::getCleanInstance($selectedModuleName);
              }

      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 'step2'.
      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

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

              $viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);

      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 "record" 10 times.
      Open

              $recordId = !$request->isEmpty('record') ? $request->getInteger('record') : '';

      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 "WORKFLOW_MODEL" 4 times.
      Open

                  $viewer->assign('WORKFLOW_MODEL', $workflowModel);

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

              $viewer->assign('MODULE', $moduleName);

      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.

      Avoid unused parameters such as '$display'.
      Open

          public function preProcess(App\Request $request, $display = true)

      UnusedFormalParameter

      Since: 0.2

      Avoid passing parameters to methods or constructors and then not using those parameters.

      Example

      class Foo
      {
          private function bar($howdy)
          {
              // $howdy is not used
          }
      }

      Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

      Call to undeclared method \Vtiger_Viewer::assign
      Open

                  $viewer->assign('WORKFLOW_MODEL', $workflowModel);
      Severity: Critical
      Found in modules/Settings/Workflows/views/Edit.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('ACTIVE_ADMIN', $admin);
      Severity: Critical
      Found in modules/Settings/Workflows/views/Edit.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

                  $viewer->assign('ADVANCE_CRITERIA', $workFlowModel->transformToAdvancedFilterCondition());
      Severity: Critical
      Found in modules/Settings/Workflows/views/Edit.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

                  $viewer->assign('ADVANCE_CRITERIA', '');
      Severity: Critical
      Found in modules/Settings/Workflows/views/Edit.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

                  $viewer->assign('MODULE_MODEL', $workflowModel->getModule());
      Severity: Critical
      Found in modules/Settings/Workflows/views/Edit.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);
      Severity: Critical
      Found in modules/Settings/Workflows/views/Edit.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('WORKFLOW_MODEL', $workFlowModel);
      Severity: Critical
      Found in modules/Settings/Workflows/views/Edit.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);
      Severity: Critical
      Found in modules/Settings/Workflows/views/Edit.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

                      $viewer->assign('SELECTED_MODULE', $selectedModule);
      Severity: Critical
      Found in modules/Settings/Workflows/views/Edit.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('RECORD_STRUCTURE', $recordStructure);
      Severity: Critical
      Found in modules/Settings/Workflows/views/Edit.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('ADVANCED_FILTER_OPTIONS_BY_TYPE', Settings_Workflows_Field_Model::getAdvancedFilterOpsByFieldType());
      Severity: Critical
      Found in modules/Settings/Workflows/views/Edit.php by phan

      Return type of getFooterScripts() is undeclared type \App\Controller\View\Vtiger_JsScript_Model[]
      Open

          public function getFooterScripts(App\Request $request)

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('IS_FILTER_SAVED_NEW', $workFlowModel->isFilterSavedInNew());
      Severity: Critical
      Found in modules/Settings/Workflows/views/Edit.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('TASK_RECORDS', $workFlowModel->getTaskTypes());
      Severity: Critical
      Found in modules/Settings/Workflows/views/Edit.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('RECORDID', $recordId);
      Severity: Critical
      Found in modules/Settings/Workflows/views/Edit.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('SKIPPED_FIELD_DATA_TYPES', ['smtp']);
      Severity: Critical
      Found in modules/Settings/Workflows/views/Edit.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('ALL_MODULES', Settings_Workflows_Module_Model::getSupportedModules());
      Severity: Critical
      Found in modules/Settings/Workflows/views/Edit.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('TASK_LIST', $workFlowModel->getTasks(false));
      Severity: Critical
      Found in modules/Settings/Workflows/views/Edit.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('MODULE', $moduleName);
      Severity: Critical
      Found in modules/Settings/Workflows/views/Edit.php by phan

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

              $viewer->assign('WEEK_START_ID', $weekDays[\App\User::getCurrentUserModel()->getDetail('dayoftheweek')]);
      Severity: Critical
      Found in modules/Settings/Workflows/views/Edit.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);
      Severity: Critical
      Found in modules/Settings/Workflows/views/Edit.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('ADVANCED_FILTER_OPTIONS', Settings_Workflows_Field_Model::getAdvancedFilterOptions());
      Severity: Critical
      Found in modules/Settings/Workflows/views/Edit.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('TRIGGER_TYPES', Settings_Workflows_Module_Model::getTriggerTypes());
      Severity: Critical
      Found in modules/Settings/Workflows/views/Edit.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('WORKFLOW_MODEL', $workFlowModel);
      Severity: Critical
      Found in modules/Settings/Workflows/views/Edit.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('RECORD_MODE', $request->getMode());
      Severity: Critical
      Found in modules/Settings/Workflows/views/Edit.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

                  $viewer->assign('RECORDID', $recordId);
      Severity: Critical
      Found in modules/Settings/Workflows/views/Edit.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('MODULE_MODEL', $selectedModule);
      Severity: Critical
      Found in modules/Settings/Workflows/views/Edit.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

                  $viewer->assign('MODE', 'edit');
      Severity: Critical
      Found in modules/Settings/Workflows/views/Edit.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('MODULE', $moduleName);
      Severity: Critical
      Found in modules/Settings/Workflows/views/Edit.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('DATE_FILTERS', Vtiger_AdvancedFilter_Helper::getDateFilter($qualifiedModuleName));
      Severity: Critical
      Found in modules/Settings/Workflows/views/Edit.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('FIELD_EXPRESSIONS', Settings_Workflows_Module_Model::getExpressions());
      Severity: Critical
      Found in modules/Settings/Workflows/views/Edit.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('SOURCE_MODULE', $selectedModuleName);
      Severity: Critical
      Found in modules/Settings/Workflows/views/Edit.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('WEEK_START_ID', $weekDays[\App\User::getCurrentUserModel()->getDetail('dayoftheweek')]);
      Severity: Critical
      Found in modules/Settings/Workflows/views/Edit.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('SELECTED_MODULE_NAME', $selectedModuleName);
      Severity: Critical
      Found in modules/Settings/Workflows/views/Edit.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('MODULE', $moduleName);
      Severity: Critical
      Found in modules/Settings/Workflows/views/Edit.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('RECORD', $recordId);
      Severity: Critical
      Found in modules/Settings/Workflows/views/Edit.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('WORKFLOW_MODEL', $workflowModel);
      Severity: Critical
      Found in modules/Settings/Workflows/views/Edit.php by phan

      Call to undeclared method \Vtiger_Viewer::assign
      Open

              $viewer->assign('COLUMNNAME_API', 'getWorkFlowFilterColumnName');
      Severity: Critical
      Found in modules/Settings/Workflows/views/Edit.php by phan

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

          public function preProcess(App\Request $request, $display = true)
          {
              parent::preProcess($request);
              $viewer = $this->getViewer($request);
              $recordId = !$request->isEmpty('record') ? $request->getInteger('record') : '';
      Severity: Major
      Found in modules/Settings/Workflows/views/Edit.php and 1 other location - About 3 hrs to fix
      modules/Settings/MappedFields/views/Edit.php on lines 18..30

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 149.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Avoid excessively long variable names like $recordStructureInstance. Keep variable name length under 20.
      Open

              $recordStructureInstance = Settings_Workflows_RecordStructure_Model::getInstanceForWorkFlowModule($workFlowModel, Settings_Workflows_RecordStructure_Model::RECORD_STRUCTURE_MODE_FILTER);

      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 Settings_Workflows_Edit_View extends Settings_Vtiger_Index_View

      The class Settings_Workflows_Edit_View is not named in CamelCase.
      Open

      class Settings_Workflows_Edit_View extends Settings_Vtiger_Index_View
      {
          public function process(App\Request $request)
          {
              $mode = $request->getMode();

      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

                  $this->step1($request);

      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

              $viewer->assign('ALL_MODULES', Settings_Workflows_Module_Model::getSupportedModules());

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

              $recordId = !$request->isEmpty('record') ? $request->getInteger('record') : '';

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

                  $workflowModel = Settings_Workflows_Record_Model::getInstance($recordId);

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

              $viewer->assign('WORKFLOW_MODEL', $workflowModel);

      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 preProcess(App\Request $request, $display = true)

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

              if ($recordId) {

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

                  $viewer->assign('WORKFLOW_MODEL', $workflowModel);

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

                  $viewer->assign('MODE', 'edit');

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

                      $viewer->assign('SELECTED_MODULE', $selectedModule);

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

              $viewer = $this->getViewer($request);

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

              $weekDays = ['Sunday' => 0, 'Monday' => 1, 'Tuesday' => 2, 'Wednesday' => 3, 'Thursday' => 4, 'Friday' => 5, 'Saturday' => 6];

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

                  $workflowModel = Settings_Workflows_Record_Model::getInstance($recordId);

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

          {

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

                  $viewer->assign('RECORDID', $recordId);

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

                  }

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

              $viewer->assign('RECORDID', $recordId);

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

              $viewer->assign('RECORD_MODE', $request->getMode());

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

              $viewer->view('EditHeader.tpl', $request->getModule(false));

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

                  $recordId = $request->getInteger('record');

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

                  $this->{$mode}($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

          public function step1(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

          {

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

              $viewer = $this->getViewer($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

              $qualifiedModuleName = $request->getModule(false);

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

              $admin = Users::getActiveAdminUser();

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

          public function step2(App\Request $request)

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

                              $value = $request->getInteger($name);

      Line exceeds 120 characters; contains 135 characters
      Open

                              $value = $request->isEmpty($name) ? null : implode(',', $request->getExploded($name, ',', 'DateInUserFormat'));

      Line exceeds 120 characters; contains 126 characters
      Open

              $viewer->assign('ADVANCED_FILTER_OPTIONS_BY_TYPE', Settings_Workflows_Field_Model::getAdvancedFilterOpsByFieldType());

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

              $viewer->assign('COLUMNNAME_API', 'getWorkFlowFilterColumnName');

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

              if ($workFlowModel->isFilterSavedInNew()) {

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

              $moduleName = $request->getModule();

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

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

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

          {

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

                  "modules.Settings.$moduleName.resources.Edit1",

      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

              if ($mode) {

      Line exceeds 120 characters; contains 134 characters
      Open

              $weekDays = ['Sunday' => 0, 'Monday' => 1, 'Tuesday' => 2, 'Wednesday' => 3, 'Thursday' => 4, 'Friday' => 5, 'Saturday' => 6];

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

                  $viewer->assign('MODULE_MODEL', $workflowModel->getModule());

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

                  if (!empty($selectedModule)) {

      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

                              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

                  }

      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

              $mode = $request->getMode();

      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

              $moduleName = $request->getModule();

      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

              }

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

              $viewer->assign('TRIGGER_TYPES', Settings_Workflows_Module_Model::getTriggerTypes());

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

              $viewer->view('Step1.tpl', $qualifiedModuleName);

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

              $qualifiedModuleName = $request->getModule(false);

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

                  if ($request->has($name)) {

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

                          case 'filtersavedinnew':

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

                          case 'schtime':

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

                              $value = $request->isEmpty($name) ? null : implode(',', $request->getExploded($name, ',', 'DateInUserFormat'));

      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

              $viewer->assign('WORKFLOW_MODEL', $workFlowModel);

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

              $viewer->assign('SKIPPED_FIELD_DATA_TYPES', ['smtp']);

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

              $viewer->assign('RECORD', $recordId);

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

              $viewer->assign('WORKFLOW_MODEL', $workFlowModel);

      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 array_merge(parent::getFooterScripts($request), $this->checkAndConvertJsScripts([

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

          }

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

                  $selectedModule = $workFlowModel->getModule();

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

              }

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

                              $value = htmlspecialchars($request->getByType($name, 'Text'));

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

                          case 'execution_condition':

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

              $viewer->assign('RECORD_STRUCTURE', $recordStructure);

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

                  $viewer->assign('ADVANCE_CRITERIA', '');

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

              $qualifiedModuleName = $request->getModule(false);

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

              $recordId = !$request->isEmpty('record') ? $request->getInteger('record') : '';

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

              if ($recordId) {

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

                  $selectedModule = $workFlowModel->getModule();

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

                              $value = $request->isEmpty($name) ? null : $request->getByType($name, 'dateTimeInUserFormat');

      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

                  $viewer->assign('ADVANCE_CRITERIA', $workFlowModel->transformToAdvancedFilterCondition());

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

              $viewer->assign('TASK_RECORDS', $workFlowModel->getTaskTypes());

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

                  "modules.Settings.$moduleName.resources.Edit",

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

                  "modules.Settings.$moduleName.resources.Edit2",

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

              $viewer = $this->getViewer($request);

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

              $moduleName = $request->getModule();

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

                      switch ($name) {

      Line exceeds 120 characters; contains 194 characters
      Open

              $recordStructureInstance = Settings_Workflows_RecordStructure_Model::getInstanceForWorkFlowModule($workFlowModel, Settings_Workflows_RecordStructure_Model::RECORD_STRUCTURE_MODE_FILTER);

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

              $viewer->assign('ADVANCED_FILTER_OPTIONS_BY_TYPE', Settings_Workflows_Field_Model::getAdvancedFilterOpsByFieldType());

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

              $viewer->assign('IS_FILTER_SAVED_NEW', $workFlowModel->isFilterSavedInNew());

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

              $viewer->view('Step3.tpl', $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

              parent::preProcess($request);

      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

                  $selectedModule = $request->getByType('source_module', 2);

      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

                          case 'schtypeid':

      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

              $viewer->assign('ADVANCED_FILTER_OPTIONS', Settings_Workflows_Field_Model::getAdvancedFilterOptions());

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

          public function step3(App\Request $request)

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

              $viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);

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

              $viewer->assign('TASK_LIST', $workFlowModel->getTasks(false));

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

              $viewer->assign('ACTIVE_ADMIN', $admin);

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

                  "modules.Settings.$moduleName.resources.AdvanceFilter",

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

              foreach (['summary', 'schdayofweek', 'schdayofmonth', 'execution_condition', 'schtypeid', 'schtime', 'schdate', 'schannualdates', 'params', 'filtersavedinnew', 'record'] as $name) {

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

                  '~vendor/ckeditor/ckeditor/adapters/jquery.js',

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

                              $value = $request->isEmpty($name) ? null : $request->getInteger($name);

      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

              }

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

              // Added to show filters only when saved from vtiger6

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

                  $selectedModuleName = $selectedModule->getName();

      Line exceeds 120 characters; contains 189 characters
      Open

              foreach (['summary', 'schdayofweek', 'schdayofmonth', 'execution_condition', 'schtypeid', 'schtime', 'schdate', 'schannualdates', 'params', 'filtersavedinnew', 'record'] as $name) {

      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

              $moduleName = $request->getModule();

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

                  "modules.Settings.$moduleName.resources.Edit3",

      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 'schdayofmonth':

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

                              ]

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

                              $value = null;

      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

                              break;

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

              //Added to support advance filters

      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

                  $workFlowModel = Settings_Workflows_Record_Model::getInstance($recordId);

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

                  $selectedModuleName = $selectedModule->getName();

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

                              $value = $request->getMultiDimensionArray($name, [

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

              $viewer->assign('MODULE', $moduleName);

      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

              $viewer->assign('FIELD_EXPRESSIONS', Settings_Workflows_Module_Model::getExpressions());

      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

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

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

                          case 'schdayofweek':

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

                              $value = empty($value) ? null : $value;

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

                          case 'record':

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

                              $value = $request->isEmpty($name) ? null : $request->getByType($name, 'TimeInUserFormat');

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

                          case 'params':

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

                      $workFlowModel->set($name, $value);

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

              $recordStructureInstance = Settings_Workflows_RecordStructure_Model::getInstanceForWorkFlowModule($workFlowModel, Settings_Workflows_RecordStructure_Model::RECORD_STRUCTURE_MODE_FILTER);

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

              $viewer->assign('SELECTED_MODULE_NAME', $selectedModuleName);

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

              $viewer->assign('MODULE', $moduleName);

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

                  '~vendor/ckeditor/ckeditor/ckeditor.js',

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

                  $workFlowModel = Settings_Workflows_Record_Model::getCleanInstance($selectedModuleName);

      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 'schdate':

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

                          case 'schannualdates':

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

                              $value = \App\Json::encode($value);

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

              $recordStructure = $recordStructureInstance->getStructure();

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

              $viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);

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

              $viewer->assign('WEEK_START_ID', $weekDays[\App\User::getCurrentUserModel()->getDetail('dayoftheweek')]);

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

                  $selectedModule = Vtiger_Module_Model::getInstance($selectedModuleName);

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

                          case 'summary':

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

              $viewer->assign('DATE_FILTERS', Vtiger_AdvancedFilter_Helper::getDateFilter($qualifiedModuleName));

      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

          {

      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

              $viewer->view('Step2.tpl', $qualifiedModuleName);

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

              $viewer->assign('SOURCE_MODULE', $selectedModuleName);

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

          public function getFooterScripts(App\Request $request)

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

                  'libraries.clipboard.dist.clipboard',

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

              $viewer->assign('MODULE', $moduleName);

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

                              $value = $request->getArray($name, 'Integer');

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

              $viewer->assign('MODULE_MODEL', $selectedModule);

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

          }

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

              $viewer = $this->getViewer($request);

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

                  $workFlowModel = Settings_Workflows_Record_Model::getCleanInstance($selectedModuleName);

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

              }

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

              $viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);

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

                  'modules.Settings.Vtiger.resources.Edit',

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

      class Settings_Workflows_Edit_View extends Settings_Vtiger_Index_View

      Expected 0 spaces before closing bracket; newline found
      Open

                              $value = $request->getMultiDimensionArray($name, [

      There are no issues that match your filters.

      Category
      Status