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);
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);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method 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);
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);
- Read upRead up
- Exclude checks
CyclomaticComplexity
Since: 0.1
Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.
Example
// Cyclomatic Complexity = 11
class Foo {
1 public function example() {
2 if ($a == $b) {
3 if ($a1 == $b1) {
fiddle();
4 } elseif ($a2 == $b2) {
fiddle();
} else {
fiddle();
}
5 } elseif ($c == $d) {
6 while ($c == $d) {
fiddle();
}
7 } elseif ($e == $f) {
8 for ($n = 0; $n < $h; $n++) {
fiddle();
}
} else {
switch ($z) {
9 case 1:
fiddle();
break;
10 case 2:
fiddle();
break;
11 case 3:
fiddle();
break;
default:
fiddle();
break;
}
}
}
}
Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity
Refactor this function to reduce its Cognitive Complexity from 30 to the 15 allowed. Open
public function step2(App\Request $request)
- Read upRead up
- Exclude checks
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)
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
Avoid using static access to class 'Vtiger_Module_Model' in method 'step2'. Open
$selectedModule = Vtiger_Module_Model::getInstance($selectedModuleName);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class 'Settings_Workflows_Record_Model' in method 'step1'. Open
$workflowModel = Settings_Workflows_Record_Model::getInstance($recordId);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class 'Settings_Workflows_Field_Model' in method 'step2'. Open
$viewer->assign('ADVANCED_FILTER_OPTIONS', Settings_Workflows_Field_Model::getAdvancedFilterOptions());
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class 'Settings_Workflows_Record_Model' in method 'step2'. Open
$workFlowModel = Settings_Workflows_Record_Model::getCleanInstance($selectedModuleName);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class 'Vtiger_AdvancedFilter_Helper' in method 'step2'. Open
$viewer->assign('DATE_FILTERS', Vtiger_AdvancedFilter_Helper::getDateFilter($qualifiedModuleName));
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
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);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class 'Settings_Workflows_Record_Model' in method 'step3'. Open
$workFlowModel = Settings_Workflows_Record_Model::getInstance($recordId);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class 'Settings_Workflows_Record_Model' in method 'step1'. Open
$workflowModel = Settings_Workflows_Record_Model::getCleanInstance($moduleName);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class 'Settings_Workflows_Module_Model' in method 'step1'. Open
$viewer->assign('ALL_MODULES', Settings_Workflows_Module_Model::getSupportedModules());
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
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);
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method 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);
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid using static access to class '\App\Json' in method 'step2'. Open
$value = \App\Json::encode($value);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class 'Settings_Workflows_Module_Model' in method 'step2'. Open
$viewer->assign('FIELD_EXPRESSIONS', Settings_Workflows_Module_Model::getExpressions());
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
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', '');
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid using static access to class 'Settings_Workflows_Record_Model' in method 'step3'. Open
$workFlowModel = Settings_Workflows_Record_Model::getCleanInstance($selectedModuleName);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
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);
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid using static access to class 'Users' in method 'step1'. Open
$admin = Users::getActiveAdminUser();
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
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());
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class 'Settings_Workflows_Record_Model' in method 'preProcess'. Open
$workflowModel = Settings_Workflows_Record_Model::getInstance($recordId);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class 'Settings_Workflows_Module_Model' in method 'step1'. Open
$viewer->assign('TRIGGER_TYPES', Settings_Workflows_Module_Model::getTriggerTypes());
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
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);
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid using static access to class 'Settings_Workflows_Record_Model' in method 'step2'. Open
$workFlowModel = Settings_Workflows_Record_Model::getInstance($request->getInteger('record'));
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Define a constant instead of duplicating this literal "QUALIFIED_MODULE" 3 times. Open
$viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);
- Read upRead up
- Exclude checks
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') : '';
- Read upRead up
- Exclude checks
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);
- Read upRead up
- Exclude checks
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);
- Read upRead up
- Exclude checks
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)
- Read upRead up
- Exclude checks
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);
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('ACTIVE_ADMIN', $admin);
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('ADVANCE_CRITERIA', $workFlowModel->transformToAdvancedFilterCondition());
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('ADVANCE_CRITERIA', '');
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('MODULE_MODEL', $workflowModel->getModule());
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('WORKFLOW_MODEL', $workFlowModel);
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('SELECTED_MODULE', $selectedModule);
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('RECORD_STRUCTURE', $recordStructure);
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('ADVANCED_FILTER_OPTIONS_BY_TYPE', Settings_Workflows_Field_Model::getAdvancedFilterOpsByFieldType());
- Exclude checks
Return type of getFooterScripts()
is undeclared type \App\Controller\View\Vtiger_JsScript_Model[]
Open
public function getFooterScripts(App\Request $request)
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('IS_FILTER_SAVED_NEW', $workFlowModel->isFilterSavedInNew());
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('TASK_RECORDS', $workFlowModel->getTaskTypes());
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('RECORDID', $recordId);
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('SKIPPED_FIELD_DATA_TYPES', ['smtp']);
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('ALL_MODULES', Settings_Workflows_Module_Model::getSupportedModules());
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('TASK_LIST', $workFlowModel->getTasks(false));
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('MODULE', $moduleName);
- Exclude checks
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')]);
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('ADVANCED_FILTER_OPTIONS', Settings_Workflows_Field_Model::getAdvancedFilterOptions());
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('TRIGGER_TYPES', Settings_Workflows_Module_Model::getTriggerTypes());
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('WORKFLOW_MODEL', $workFlowModel);
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('RECORD_MODE', $request->getMode());
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('RECORDID', $recordId);
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('MODULE_MODEL', $selectedModule);
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('MODE', 'edit');
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('MODULE', $moduleName);
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('DATE_FILTERS', Vtiger_AdvancedFilter_Helper::getDateFilter($qualifiedModuleName));
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('FIELD_EXPRESSIONS', Settings_Workflows_Module_Model::getExpressions());
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('SOURCE_MODULE', $selectedModuleName);
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('WEEK_START_ID', $weekDays[\App\User::getCurrentUserModel()->getDetail('dayoftheweek')]);
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('SELECTED_MODULE_NAME', $selectedModuleName);
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('MODULE', $moduleName);
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('RECORD', $recordId);
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('WORKFLOW_MODEL', $workflowModel);
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('COLUMNNAME_API', 'getWorkFlowFilterColumnName');
- Exclude checks
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') : '';
- Read upRead up
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
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);
- Read upRead up
- Exclude checks
LongVariable
Since: 0.2
Detects when a field, formal or local variable is declared with a long name.
Example
class Something {
protected $reallyLongIntName = -3; // VIOLATION - Field
public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
$otherReallyLongName = -5; // VIOLATION - Local
for ($interestingIntIndex = 0; // VIOLATION - For
$interestingIntIndex < 10;
$interestingIntIndex++ ) {
}
}
}
Source https://phpmd.org/rules/naming.html#longvariable
Each class must be in a namespace of at least one level (a top-level vendor name) Open
class Settings_Workflows_Edit_View extends Settings_Vtiger_Index_View
- Exclude checks
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();
- Read upRead up
- Exclude checks
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);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!$request->isEmpty('record')) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('ALL_MODULES', Settings_Workflows_Module_Model::getSupportedModules());
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordId = !$request->isEmpty('record') ? $request->getInteger('record') : '';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$workflowModel = Settings_Workflows_Record_Model::getInstance($recordId);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('WORKFLOW_MODEL', $workflowModel);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function preProcess(App\Request $request, $display = true)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($recordId) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('WORKFLOW_MODEL', $workflowModel);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('MODE', 'edit');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('SELECTED_MODULE', $selectedModule);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer = $this->getViewer($request);
- Exclude checks
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];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$workflowModel = Settings_Workflows_Record_Model::getInstance($recordId);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('RECORDID', $recordId);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('RECORDID', $recordId);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('RECORD_MODE', $request->getMode());
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->view('EditHeader.tpl', $request->getModule(false));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordId = $request->getInteger('record');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->{$mode}($request);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function step1(App\Request $request)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer = $this->getViewer($request);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$qualifiedModuleName = $request->getModule(false);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$admin = Users::getActiveAdminUser();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function step2(App\Request $request)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$value = $request->getInteger($name);
- Exclude checks
Line exceeds 120 characters; contains 135 characters Open
$value = $request->isEmpty($name) ? null : implode(',', $request->getExploded($name, ',', 'DateInUserFormat'));
- Exclude checks
Line exceeds 120 characters; contains 126 characters Open
$viewer->assign('ADVANCED_FILTER_OPTIONS_BY_TYPE', Settings_Workflows_Field_Model::getAdvancedFilterOpsByFieldType());
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('COLUMNNAME_API', 'getWorkFlowFilterColumnName');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($workFlowModel->isFilterSavedInNew()) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$moduleName = $request->getModule();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$selectedModuleName = $request->getByType('module_name', 2);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
"modules.Settings.$moduleName.resources.Edit1",
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function process(App\Request $request)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($mode) {
- Exclude checks
Line exceeds 120 characters; contains 134 characters Open
$weekDays = ['Sunday' => 0, 'Monday' => 1, 'Tuesday' => 2, 'Wednesday' => 3, 'Thursday' => 4, 'Friday' => 5, 'Saturday' => 6];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('MODULE_MODEL', $workflowModel->getModule());
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!empty($selectedModule)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
break;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$mode = $request->getMode();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$moduleName = $request->getModule();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('TRIGGER_TYPES', Settings_Workflows_Module_Model::getTriggerTypes());
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->view('Step1.tpl', $qualifiedModuleName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$qualifiedModuleName = $request->getModule(false);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($request->has($name)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
case 'filtersavedinnew':
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
case 'schtime':
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$value = $request->isEmpty($name) ? null : implode(',', $request->getExploded($name, ',', 'DateInUserFormat'));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'enableTasks' => \App\Purifier::BOOL,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('WORKFLOW_MODEL', $workFlowModel);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('SKIPPED_FIELD_DATA_TYPES', ['smtp']);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('RECORD', $recordId);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('WORKFLOW_MODEL', $workFlowModel);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return array_merge(parent::getFooterScripts($request), $this->checkAndConvertJsScripts([
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$selectedModule = $workFlowModel->getModule();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$value = htmlspecialchars($request->getByType($name, 'Text'));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
case 'execution_condition':
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('RECORD_STRUCTURE', $recordStructure);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('ADVANCE_CRITERIA', '');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$qualifiedModuleName = $request->getModule(false);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordId = !$request->isEmpty('record') ? $request->getInteger('record') : '';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($recordId) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$selectedModule = $workFlowModel->getModule();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$value = $request->isEmpty($name) ? null : $request->getByType($name, 'dateTimeInUserFormat');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'showTasks' => \App\Purifier::BOOL,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('ADVANCE_CRITERIA', $workFlowModel->transformToAdvancedFilterCondition());
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('TASK_RECORDS', $workFlowModel->getTaskTypes());
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
"modules.Settings.$moduleName.resources.Edit",
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
"modules.Settings.$moduleName.resources.Edit2",
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer = $this->getViewer($request);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$moduleName = $request->getModule();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
switch ($name) {
- Exclude checks
Line exceeds 120 characters; contains 194 characters Open
$recordStructureInstance = Settings_Workflows_RecordStructure_Model::getInstanceForWorkFlowModule($workFlowModel, Settings_Workflows_RecordStructure_Model::RECORD_STRUCTURE_MODE_FILTER);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('ADVANCED_FILTER_OPTIONS_BY_TYPE', Settings_Workflows_Field_Model::getAdvancedFilterOpsByFieldType());
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('IS_FILTER_SAVED_NEW', $workFlowModel->isFilterSavedInNew());
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->view('Step3.tpl', $qualifiedModuleName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
parent::preProcess($request);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$workflowModel = Settings_Workflows_Record_Model::getCleanInstance($moduleName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$selectedModule = $request->getByType('source_module', 2);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!$request->isEmpty('record')) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
case 'schtypeid':
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'iterationOff' => \App\Purifier::BOOL,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('ADVANCED_FILTER_OPTIONS', Settings_Workflows_Field_Model::getAdvancedFilterOptions());
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function step3(App\Request $request)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('TASK_LIST', $workFlowModel->getTasks(false));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('ACTIVE_ADMIN', $admin);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
"modules.Settings.$moduleName.resources.AdvanceFilter",
- Exclude checks
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) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'~vendor/ckeditor/ckeditor/adapters/jquery.js',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$value = $request->isEmpty($name) ? null : $request->getInteger($name);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
break;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
break;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// Added to show filters only when saved from vtiger6
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$selectedModuleName = $selectedModule->getName();
- Exclude checks
Line exceeds 120 characters; contains 189 characters Open
foreach (['summary', 'schdayofweek', 'schdayofmonth', 'execution_condition', 'schtypeid', 'schtime', 'schdate', 'schannualdates', 'params', 'filtersavedinnew', 'record'] as $name) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
break;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$moduleName = $request->getModule();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
"modules.Settings.$moduleName.resources.Edit3",
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
case 'schdayofmonth':
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
]
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$value = null;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$workFlowModel = Settings_Workflows_Record_Model::getInstance($request->getInteger('record'));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
break;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
//Added to support advance filters
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
break;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$workFlowModel = Settings_Workflows_Record_Model::getInstance($recordId);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$selectedModuleName = $selectedModule->getName();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$value = $request->getMultiDimensionArray($name, [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('MODULE', $moduleName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
default:
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('FIELD_EXPRESSIONS', Settings_Workflows_Module_Model::getExpressions());
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$selectedModuleName = $request->getByType('module_name', 2);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
case 'schdayofweek':
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$value = empty($value) ? null : $value;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
case 'record':
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$value = $request->isEmpty($name) ? null : $request->getByType($name, 'TimeInUserFormat');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
case 'params':
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$workFlowModel->set($name, $value);
- Exclude checks
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);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('SELECTED_MODULE_NAME', $selectedModuleName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('MODULE', $moduleName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'~vendor/ckeditor/ckeditor/ckeditor.js',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$workFlowModel = Settings_Workflows_Record_Model::getCleanInstance($selectedModuleName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
break;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
case 'schdate':
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
case 'schannualdates':
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$value = \App\Json::encode($value);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$recordStructure = $recordStructureInstance->getStructure();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('WEEK_START_ID', $weekDays[\App\User::getCurrentUserModel()->getDetail('dayoftheweek')]);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$selectedModule = Vtiger_Module_Model::getInstance($selectedModuleName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
case 'summary':
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('DATE_FILTERS', Vtiger_AdvancedFilter_Helper::getDateFilter($qualifiedModuleName));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
} else {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
]));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
break;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->view('Step2.tpl', $qualifiedModuleName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('SOURCE_MODULE', $selectedModuleName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function getFooterScripts(App\Request $request)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'libraries.clipboard.dist.clipboard',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('MODULE', $moduleName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$value = $request->getArray($name, 'Integer');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('MODULE_MODEL', $selectedModule);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer = $this->getViewer($request);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$workFlowModel = Settings_Workflows_Record_Model::getCleanInstance($selectedModuleName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'modules.Settings.Vtiger.resources.Edit',
- Exclude checks
Class name "Settings_Workflows_Edit_View" is not in camel caps format Open
class Settings_Workflows_Edit_View extends Settings_Vtiger_Index_View
- Exclude checks
Expected 0 spaces before closing bracket; newline found Open
$value = $request->getMultiDimensionArray($name, [
- Exclude checks