Function convert
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
protected function convert(array $entries): array
{
$columns = array_keys($this->columns);
$fieldName = $this->fieldModel->getName();
$columnCounter = $records = $sum = [];
- 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 loadColumns
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function loadColumns(): void
{
$moduleName = $this->fieldModel->getModuleName();
$fieldName = $this->fieldModel->getName();
$fieldNameForColor = App\Colors::sanitizeValue($fieldName);
Method convert
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function convert(array $entries): array
{
$columns = array_keys($this->columns);
$fieldName = $this->fieldModel->getName();
$columnCounter = $records = $sum = [];
Function loadColumns
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function loadColumns(): void
{
$moduleName = $this->fieldModel->getModuleName();
$fieldName = $this->fieldModel->getName();
$fieldNameForColor = App\Colors::sanitizeValue($fieldName);
- 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
Function getSummaryFields
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
protected function getSummaryFields(): array
{
if (empty($this->board['detail_fields'])) {
$summaryFieldsList = $this->moduleModel->getSummaryViewFieldsList();
$fields = [];
- 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 process
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function process(App\Request $request)
{
$ajax = $request->isAjax();
$moduleName = $request->getModule();
$this->viewName = $request->has('viewName') ? $request->getByType('viewName', \App\Purifier::ALNUM) : App\CustomView::getInstance($moduleName)->getViewId();
The method convert() has a Cyclomatic Complexity of 11. The configured cyclomatic complexity threshold is 10. Open
protected function convert(array $entries): array
{
$columns = array_keys($this->columns);
$fieldName = $this->fieldModel->getName();
$columnCounter = $records = $sum = [];
- 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 24 to the 15 allowed. Open
protected function convert(array $entries): array
- 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 class Vtiger_Kanban_View has a coupling between objects value of 18. Consider to reduce the number of dependencies under 13. Open
class Vtiger_Kanban_View extends Vtiger_Index_View
{
/** @var array Active board details. */
protected $board;
- Read upRead up
- Exclude checks
CouplingBetweenObjects
Since: 1.1.0
A class with too many dependencies has negative impacts on several quality aspects of a class. This includes quality criteria like stability, maintainability and understandability
Example
class Foo {
/**
* @var \foo\bar\X
*/
private $x = null;
/**
* @var \foo\bar\Y
*/
private $y = null;
/**
* @var \foo\bar\Z
*/
private $z = null;
public function setFoo(\Foo $foo) {}
public function setBar(\Bar $bar) {}
public function setBaz(\Baz $baz) {}
/**
* @return \SplObjectStorage
* @throws \OutOfRangeException
* @throws \InvalidArgumentException
* @throws \ErrorException
*/
public function process(\Iterator $it) {}
// ...
}
Source https://phpmd.org/rules/design.html#couplingbetweenobjects
Missing class import via use statement (line '35', column '14'). Open
throw new \App\Exceptions\NoPermitted('LBL_PERMISSION_DENIED', 406);
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '139', column '15'). Open
throw new \App\Exceptions\AppException('ERR_NOT_ALLOWED_FIELD_TYPE');
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '153', column '22'). Open
$pagingModel = new Vtiger_Paging_Model();
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Avoid using static access to class 'CustomView_Record_Model' in method 'process'. Open
$viewer->assign('CUSTOM_VIEWS', CustomView_Record_Model::getAll($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 assigning values to variables in if clauses and the like (line '212', column '11'). Open
protected function convert(array $entries): array
{
$columns = array_keys($this->columns);
$fieldName = $this->fieldModel->getName();
$columnCounter = $records = $sum = [];
- Read upRead up
- Exclude checks
IfStatementAssignment
Since: 2.7.0
Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.
Example
class Foo
{
public function bar($flag)
{
if ($foo = 'bar') { // possible typo
// ...
}
if ($baz = 0) { // always false
// ...
}
}
}
Source http://phpmd.org/rules/cleancode.html#ifstatementassignment
Avoid using static access to class 'App\Colors' in method 'loadColumns'. Open
$fieldNameForColor = App\Colors::sanitizeValue($fieldName);
- 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 '\App\Utils\Kanban' in method 'process'. Open
$boards = \App\Utils\Kanban::getBoards($moduleName, true);
- 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_Module_Model' in method 'process'. Open
$this->moduleModel = \Vtiger_Module_Model::getInstance($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 assigning values to variables in if clauses and the like (line '110', column '9'). Open
public function loadColumns(): void
{
$moduleName = $this->fieldModel->getModuleName();
$fieldName = $this->fieldModel->getName();
$fieldNameForColor = App\Colors::sanitizeValue($fieldName);
- Read upRead up
- Exclude checks
IfStatementAssignment
Since: 2.7.0
Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.
Example
class Foo
{
public function bar($flag)
{
if ($foo = 'bar') { // possible typo
// ...
}
if ($baz = 0) { // always false
// ...
}
}
}
Source http://phpmd.org/rules/cleancode.html#ifstatementassignment
Avoid assigning values to variables in if clauses and the like (line '124', column '9'). Open
public function loadColumns(): void
{
$moduleName = $this->fieldModel->getModuleName();
$fieldName = $this->fieldModel->getName();
$fieldNameForColor = App\Colors::sanitizeValue($fieldName);
- Read upRead up
- Exclude checks
IfStatementAssignment
Since: 2.7.0
Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.
Example
class Foo
{
public function bar($flag)
{
if ($foo = 'bar') { // possible typo
// ...
}
if ($baz = 0) { // always false
// ...
}
}
}
Source http://phpmd.org/rules/cleancode.html#ifstatementassignment
Avoid using static access to class 'App\Fields\Picklist' in method 'loadColumns'. Open
$picklistValues = App\Fields\Picklist::getValues($fieldName);
- 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 '\App\Language' in method 'loadColumns'. Open
'label' => \App\Language::translate($value['picklistValue'], $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 '\App\User' in method 'loadColumns'. Open
}
- 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 assigning values to variables in if clauses and the like (line '199', column '7'). Open
protected function convert(array $entries): array
{
$columns = array_keys($this->columns);
$fieldName = $this->fieldModel->getName();
$columnCounter = $records = $sum = [];
- Read upRead up
- Exclude checks
IfStatementAssignment
Since: 2.7.0
Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.
Example
class Foo
{
public function bar($flag)
{
if ($foo = 'bar') { // possible typo
// ...
}
if ($baz = 0) { // always false
// ...
}
}
}
Source http://phpmd.org/rules/cleancode.html#ifstatementassignment
Avoid using static access to class 'App\Language' in method 'getPageTitle'. Open
$title = App\Language::translate($moduleName, $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 'Vtiger_ListView_Model' in method 'getRecords'. Open
$listViewModel = Vtiger_ListView_Model::getInstance($moduleName, $this->viewName);
- 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 'App\Colors' in method 'loadColumns'. Open
$color = "{$moduleName}_{$fieldNameForColor}_" . App\Colors::sanitizeValue($value['picklistValue']);
- 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->board = reset($boards);
}
- 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 '\Vtiger_Field_Model' in method 'process'. Open
$this->fieldModel = \Vtiger_Field_Model::getInstanceFromFieldId($this->board['fieldid']);
- 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 {
$viewer->assign('BOARDS', $boards);
$viewer->assign('VIEW', $request->getByType('view', 1));
$viewer->assign('CUSTOM_VIEWS', CustomView_Record_Model::getAll($moduleName));
$viewer->assign('VIEWID', $this->viewName);
- 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\Language' in method 'getPageTitle'. Open
return $title . ' ' . App\Language::translate('LBL_VIEW_KANBAN', $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 'App\Fields\Owner' in method 'loadColumns'. Open
$owner = App\Fields\Owner::getInstance($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
Define a constant instead of duplicating this literal "colorBg" 3 times. Open
'colorBg' => 'picklistLb_' . $color,
- 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 "isEditable" 3 times. Open
'isEditable' => isset($allowedValues[$value['picklistValue']]),
- 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 "private" 3 times. Open
$allowedValues = $owner->getAccessibleUsers('private', 'owner');
- 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 "board" 3 times. Open
if ($request->has('board') && isset($boards[$request->getInteger('board')])) {
- 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 "class" 3 times. Open
'class' => '',
- 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 "owner" 4 times. Open
case 'owner':
- 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.
Rename "$columns" which has the same name as the field declared at line 29. Open
$columns = array_keys($this->columns);
- Read upRead up
- Exclude checks
Shadowing fields with a local variable is a bad practice that reduces code readability: it makes it confusing to know whether the field or the variable is being used.
Noncompliant Code Example
class Foo { public $myField; public function doSomething() { $myField = 0; ... } }
See
- CERT, DCL51-J. - Do not shadow or obscure identifiers in subscopes
Define a constant instead of duplicating this literal "colorBr" 3 times. Open
'colorBr' => 'picklistCBr_' . $color,
- 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 "picklistValue" 4 times. Open
$color = "{$moduleName}_{$fieldNameForColor}_" . App\Colors::sanitizeValue($value['picklistValue']);
- 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 "label" 3 times. Open
'label' => \App\Language::translate($value['picklistValue'], $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.
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('ACTIVE_BOARD', $this->board);
- Exclude checks
Call to method getInstance
from undeclared class \App\Fields\Owner
Open
$owner = App\Fields\Owner::getInstance($moduleName);
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('ACTIVE_FIELD', $this->fieldModel);
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('VIEW', $request->getByType('view', 1));
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('COLUMNS', $this->columns);
- Exclude checks
Call to method getImageById
from undeclared class \App\User
(Did you mean class \Tests\App\User) Open
'image' => \App\User::getImageById($key)['url'] ?? '',
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('MODULE_MODEL', $this->moduleModel);
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('DATA', $this->getRecords($request));
- Exclude checks
Call to method setFields
from undeclared class \App\QueryGenerator
(Did you mean class \Tests\App\QueryGenerator) Open
$listViewModel->getQueryGenerator()->setFields(array_merge($this->getSummaryFields(), ['id', $this->fieldModel->getName()], $this->board['sum_fields']));
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('BOARDS', $boards);
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('VIEWID', $this->viewName);
- Exclude checks
Call to undeclared method \Vtiger_Viewer::assign
Open
$viewer->assign('CUSTOM_VIEWS', CustomView_Record_Model::getAll($moduleName));
- Exclude checks
Each class must be in a namespace of at least one level (a top-level vendor name) Open
class Vtiger_Kanban_View extends Vtiger_Index_View
- Exclude checks
The class Vtiger_Kanban_View is not named in CamelCase. Open
class Vtiger_Kanban_View extends Vtiger_Index_View
{
/** @var array Active board details. */
protected $board;
- 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
protected $fieldModel;
- 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 $title . ' ' . App\Language::translate('LBL_VIEW_KANBAN', $moduleName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/** {@inheritdoc} */
- 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
$allowedValues = $this->fieldModel->getPicklistValues();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'image' => \App\User::getImageById($key)['url'] ?? '',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->viewName = $request->has('viewName') ? $request->getByType('viewName', \App\Purifier::ALNUM) : App\CustomView::getInstance($moduleName)->getViewId();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('ACTIVE_FIELD', $this->fieldModel);
- 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 'owner':
- 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
$this->columns[$value['picklistValue']] = [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
throw new \App\Exceptions\NoPermitted('LBL_PERMISSION_DENIED', 406);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$ajax = $request->isAjax();
- 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
'colorBg' => 'picklistLb_' . $color,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'colorBr' => 'picklistCBr_' . $color,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->columns[$key] = [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
protected $columns = [];
- 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
if ($request->has('board') && isset($boards[$request->getInteger('board')])) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->view('Kanban/Main.tpl', $moduleName);
- 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 'picklist':
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($users = $owner->getAccessibleUsers('Public')) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$allowedValues = $owner->getAccessibleUsers('private', 'owner');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
foreach ($users as $key => $value) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'class' => '',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$title = App\Language::translate($moduleName, $moduleName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->moduleModel = \Vtiger_Module_Model::getInstance($moduleName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @return void
- 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
$moduleName = $this->fieldModel->getModuleName();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!Users_Privileges_Model::getCurrentUserPrivilegesModel()->hasModuleActionPermission($request->getModule(), 'Kanban')) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/** {@inheritdoc} */
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('DATA', $this->getRecords($request));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($ajax) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('BOARDS', $boards);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'label' => \App\Language::translate($value['picklistValue'], $moduleName),
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'class' => '',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
protected $board;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
protected $viewName;
- 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
$boards = \App\Utils\Kanban::getBoards($moduleName, true);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->board = reset($boards);
- 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
$viewer->view('Kanban/Kanban.tpl', $moduleName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('VIEWID', $this->viewName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
switch ($this->fieldModel->getFieldDataType()) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/** {@inheritdoc} */
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function getPageTitle(App\Request $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
public function process(App\Request $request)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('ACTIVE_BOARD', $this->board);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/** @var array Active board details. */
- 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
$moduleName = 'Vtiger' === $moduleName ? 'YetiForce' : $moduleName;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->board = $boards[$request->getInteger('board')];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->fieldModel = \Vtiger_Field_Model::getInstanceFromFieldId($this->board['fieldid']);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function loadColumns(): void
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$owner->showRoleName = false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/** @var array Kanban columns details . */
- 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
$viewer->assign('CUSTOM_VIEWS', CustomView_Record_Model::getAll($moduleName));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Get columns for kanban.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$fieldNameForColor = App\Colors::sanitizeValue($fieldName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'isEditable' => isset($allowedValues[$value['picklistValue']]),
- 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
$this->loadColumns();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
foreach ($picklistValues as $value) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$color = "{$moduleName}_{$fieldNameForColor}_" . App\Colors::sanitizeValue($value['picklistValue']);
- 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
$owner = App\Fields\Owner::getInstance($moduleName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$allowedValues = $owner->getAccessibleGroups('private', 'owner', true);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Get kanban records.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (!empty($orderBy)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$listViewModel->set('orderby', $orderBy);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($sumFields = $this->board['sum_fields']) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
foreach ($sumFields as $sumFieldName) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$sum[$column][$sumFieldName] = 0;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$sum[$column][$sumFieldName] = ((float) $val) + $sum[$column][$sumFieldName];
- 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 [
- Exclude checks
Line exceeds 120 characters; contains 164 characters Open
$this->viewName = $request->has('viewName') ? $request->getByType('viewName', \App\Purifier::ALNUM) : App\CustomView::getInstance($moduleName)->getViewId();
- 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('VIEW', $request->getByType('view', 1));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$picklistValues = App\Fields\Picklist::getValues($fieldName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'label' => $value,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'colorBg' => 'ownerCBg_' . $key,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->columns[$key] = [
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$listViewModel->getQueryGenerator()->setFields(array_merge($this->getSummaryFields(), ['id', $this->fieldModel->getName()], $this->board['sum_fields']));
- 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
$fields[] = $fieldName;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param Vtiger_Record_Model[] $entries
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/** @var int|string List view name or id. */
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
protected $moduleModel;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'isEditable' => isset($allowedValues[$key]),
- 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 string[]
- 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
/** @var \Vtiger_Field_Model Field Model instance. */
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function checkPermission(App\Request $request)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('MODULE_MODEL', $this->moduleModel);
- 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
$fieldName = $this->fieldModel->getName();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'description' => $value['description'] ?? '',
- 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
'icon' => 'fas fa-user',
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'class' => '',
- 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
* @return array
- Exclude checks
Line exceeds 120 characters; contains 161 characters Open
$listViewModel->getQueryGenerator()->setFields(array_merge($this->getSummaryFields(), ['id', $this->fieldModel->getName()], $this->board['sum_fields']));
- 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
}
- 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
$pagingModel = new Vtiger_Paging_Model();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($fieldModel->isViewableInDetailView()) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Convert the data.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$fieldName = $this->fieldModel->getName();
- 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
throw new \App\Exceptions\AppException('ERR_NOT_ALLOWED_FIELD_TYPE');
- 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
protected function getRecords(App\Request $request): array
- 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
foreach ($entries as $id => $recordModel) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($val = $recordModel->get($sumFieldName)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$columnCounter[$column] = isset($records[$column]) ? \count($records[$column]) : 0;
- 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
if ($group = $owner->getAccessibleGroups('private', 'owner', true)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'label' => $value,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'icon' => 'adminIcon-groups',
- 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
protected function getSummaryFields(): array
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$summaryFieldsList = $this->moduleModel->getSummaryViewFieldsList();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($summaryFieldsList) {
- 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
/** @var \Vtiger_Module_Model Module Model instance. */
- Exclude checks
Line exceeds 120 characters; contains 131 characters Open
if (!Users_Privileges_Model::getCurrentUserPrivilegesModel()->hasModuleActionPermission($request->getModule(), 'Kanban')) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$viewer->assign('COLUMNS', $this->columns);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'icon' => $value['icon'] ?? '',
- 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
foreach ($columns as $column) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (\in_array($column, $columns)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($sumFields) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'records' => $records,
- 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 $this->convert($listViewModel->getListViewEntries($pagingModel));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$column = $recordModel->get($fieldName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'colorBr' => 'ownerCBr_' . $key,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$fields = [];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
foreach ($summaryFieldsList as $fieldName => $fieldModel) {
- 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
$columnCounter = $records = $sum = [];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
foreach ($columns as $column) {
- 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
$moduleName = $request->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
* Get summary fields for kanban item.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (empty($this->board['detail_fields'])) {
- 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
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'columnCounter' => $columnCounter,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param \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
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $fields;
- 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
protected function convert(array $entries): array
- 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
'isEditable' => isset($allowedValues[$key]),
- 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
$listViewModel = Vtiger_ListView_Model::getInstance($moduleName, $this->viewName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
foreach ($group as $key => $value) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'colorBg' => 'ownerCBg_' . $key,
- 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
$pagingModel->set('viewid', $this->viewName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$orderBy = $request->getArray('orderBy', \App\Purifier::STANDARD, [], \App\Purifier::SQL);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$pagingModel->set('limit', Vtiger_Paging_Model::PAGE_MAX_LIMIT);
- 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 $this->board['detail_fields'];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$columns = array_keys($this->columns);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$records[$column][$id] = $recordModel;
- 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
'colorBr' => 'ownerCBr_' . $key,
- 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
foreach ($sumFields as $sumFieldName) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
'sum' => $sum,
- 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
* @return array
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Class name "Vtiger_Kanban_View" is not in camel caps format Open
class Vtiger_Kanban_View extends Vtiger_Index_View
- Exclude checks