YetiForceCompany/YetiForceCRM

View on GitHub
app/Utils/Kanban.php

Summary

Maintainability
A
1 hr
Test Coverage
F
21%

Function getBoards has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

    public static function getBoards(string $moduleName, bool $privileges = false): array
    {
        if (!\App\Cache::has('KanbanGetBoards', $moduleName)) {
            $dataReader = (new \App\Db\Query())->from('s_#__kanban_boards')
                ->where(['tabid' => \App\Module::getModuleId($moduleName)])
Severity: Minor
Found in app/Utils/Kanban.php - About 1 hr to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function deleteField has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    public static function deleteField(string $moduleName, string $fieldName)
    {
        foreach (self::getBoards($moduleName) as $board) {
            foreach (['detail_fields', 'sum_fields'] as $type) {
                if (false !== ($key = array_search($fieldName, $board[$type]))) {
Severity: Minor
Found in app/Utils/Kanban.php - About 25 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Missing class import via use statement (line '31', column '23').
Open

            $dataReader = (new \App\Db\Query())->from('s_#__kanban_boards')
Severity: Minor
Found in app/Utils/Kanban.php by phpmd

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 '65', column '19').
Open

        if ($row = (new \App\Db\Query())->from('s_#__kanban_boards')->where(['id' => $id])->one(\App\Db::getInstance('admin'))) {
Severity: Minor
Found in app/Utils/Kanban.php by phpmd

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 '83', column '20').
Open

        $sequence = (new \App\Db\Query())
Severity: Minor
Found in app/Utils/Kanban.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

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

    public static function getBoards(string $moduleName, bool $privileges = false): array
Severity: Minor
Found in app/Utils/Kanban.php by phpmd

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 '\App\Db' in method 'getBoards'.
Open

                ->createCommand(\App\Db::getInstance('admin'))->query();
Severity: Minor
Found in app/Utils/Kanban.php by phpmd

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\Cache' in method 'getBoards'.
Open

            \App\Cache::save('KanbanGetBoards', $moduleName, $rows);
Severity: Minor
Found in app/Utils/Kanban.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

Avoid using static access to class '\App\Json' in method 'getBoards'.
Open

                $row['sum_fields'] = \App\Json::decode($row['sum_fields']);
Severity: Minor
Found in app/Utils/Kanban.php by phpmd

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

        } else {
            $rows = \App\Cache::get('KanbanGetBoards', $moduleName);
        }
Severity: Minor
Found in app/Utils/Kanban.php by phpmd

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\Cache' in method 'clearCache'.
Open

        \App\Cache::delete('KanbanGetBoards', $moduleName);
Severity: Minor
Found in app/Utils/Kanban.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

Avoid using static access to class '\App\Json' in method 'getBoards'.
Open

                $row['detail_fields'] = \App\Json::decode($row['detail_fields']);
Severity: Minor
Found in app/Utils/Kanban.php by phpmd

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\Cache' in method 'getBoards'.
Open

            $rows = \App\Cache::get('KanbanGetBoards', $moduleName);
Severity: Minor
Found in app/Utils/Kanban.php by phpmd

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

    public static function getBoard(int $id): array
    {
        if ($row = (new \App\Db\Query())->from('s_#__kanban_boards')->where(['id' => $id])->one(\App\Db::getInstance('admin'))) {
            foreach (['detail_fields', 'sum_fields'] as $type) {
                $row[$type] = \App\Json::decode($row[$type]);
Severity: Minor
Found in app/Utils/Kanban.php by phpmd

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

    public static function deleteBoard(int $id): void
    {
        if ($row = self::getBoard($id)) {
            \App\Db::getInstance('admin')->createCommand()
                ->delete('s_#__kanban_boards', ['id' => $id])
Severity: Minor
Found in app/Utils/Kanban.php by phpmd

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\Cache' in method 'getBoards'.
Open

        if (!\App\Cache::has('KanbanGetBoards', $moduleName)) {
Severity: Minor
Found in app/Utils/Kanban.php by phpmd

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\Module' in method 'updateBoard'.
Open

        self::clearCache(\App\Module::getModuleName($row['tabid']));
Severity: Minor
Found in app/Utils/Kanban.php by phpmd

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

        $moduleModel = \Vtiger_Module_Model::getInstance($moduleName);
Severity: Minor
Found in app/Utils/Kanban.php by phpmd

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 '193', column '20').
Open

    public static function deleteField(string $moduleName, string $fieldName)
    {
        foreach (self::getBoards($moduleName) as $board) {
            foreach (['detail_fields', 'sum_fields'] as $type) {
                if (false !== ($key = array_search($fieldName, $board[$type]))) {
Severity: Minor
Found in app/Utils/Kanban.php by phpmd

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

            ->update('s_#__kanban_boards', [$type => \App\Json::encode($value)], ['id' => $id])
Severity: Minor
Found in app/Utils/Kanban.php by phpmd

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\Db' in method 'getBoard'.
Open

        if ($row = (new \App\Db\Query())->from('s_#__kanban_boards')->where(['id' => $id])->one(\App\Db::getInstance('admin'))) {
Severity: Minor
Found in app/Utils/Kanban.php by phpmd

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

        $fieldModel = \Vtiger_Field_Model::getInstanceFromFieldId($fieldId);
Severity: Minor
Found in app/Utils/Kanban.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

Avoid using static access to class '\App\Json' in method 'addBoard'.
Open

                'detail_fields' => \App\Json::encode($fields),
Severity: Minor
Found in app/Utils/Kanban.php by phpmd

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\Module' in method 'deleteBoard'.
Open

            self::clearCache(\App\Module::getModuleName($row['tabid']));
Severity: Minor
Found in app/Utils/Kanban.php by phpmd

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

                $fieldModel = \Vtiger_Field_Model::getInstanceFromFieldId($id);
Severity: Minor
Found in app/Utils/Kanban.php by phpmd

StaticAccess

Since: 1.4.0

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

Example

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

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

Avoid using static access to class '\App\Json' in method 'getBoard'.
Open

                $row[$type] = \App\Json::decode($row[$type]);
Severity: Minor
Found in app/Utils/Kanban.php by phpmd

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\Module' in method 'getBoards'.
Open

                ->where(['tabid' => \App\Module::getModuleId($moduleName)])
Severity: Minor
Found in app/Utils/Kanban.php by phpmd

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

                ->where(['tabid' => \App\Module::getModuleId($moduleName)])
Severity: Critical
Found in app/Utils/Kanban.php by sonar-php

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

        if (!\App\Cache::has('KanbanGetBoards', $moduleName)) {
Severity: Critical
Found in app/Utils/Kanban.php by sonar-php

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

                ->orderBy(['sequence' => SORT_ASC])
Severity: Critical
Found in app/Utils/Kanban.php by sonar-php

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 "admin" 6 times.
Open

                ->createCommand(\App\Db::getInstance('admin'))->query();
Severity: Critical
Found in app/Utils/Kanban.php by sonar-php

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 "s_#__kanban_boards" 7 times.
Open

            $dataReader = (new \App\Db\Query())->from('s_#__kanban_boards')
Severity: Critical
Found in app/Utils/Kanban.php by sonar-php

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

                $row['sum_fields'] = \App\Json::decode($row['sum_fields']);
Severity: Critical
Found in app/Utils/Kanban.php by sonar-php

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

                $row['detail_fields'] = \App\Json::decode($row['detail_fields']);
Severity: Critical
Found in app/Utils/Kanban.php by sonar-php

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 \App\Db\Query::from
Open

        $sequence = (new \App\Db\Query())
Severity: Critical
Found in app/Utils/Kanban.php by phan

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

            $dataReader = (new \App\Db\Query())->from('s_#__kanban_boards')
Severity: Critical
Found in app/Utils/Kanban.php by phan

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

            \App\Db::getInstance('admin')->createCommand()
Severity: Critical
Found in app/Utils/Kanban.php by phan

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

        \App\Db::getInstance('admin')->createCommand()
Severity: Critical
Found in app/Utils/Kanban.php by phan

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

        $createCommand = \App\Db::getInstance('admin')->createCommand();
Severity: Critical
Found in app/Utils/Kanban.php by phan

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

        if ($row = (new \App\Db\Query())->from('s_#__kanban_boards')->where(['id' => $id])->one(\App\Db::getInstance('admin'))) {
Severity: Critical
Found in app/Utils/Kanban.php by phan

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

        \App\Db::getInstance('admin')->createCommand()
Severity: Critical
Found in app/Utils/Kanban.php by phan

Avoid variables with short names like $id. Configured minimum length is 3.
Open

    public static function getBoard(int $id): array
Severity: Minor
Found in app/Utils/Kanban.php by phpmd

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

Avoid variables with short names like $id. Configured minimum length is 3.
Open

    public static function updateBoard(int $id, string $type, array $value): void
Severity: Minor
Found in app/Utils/Kanban.php by phpmd

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

Avoid variables with short names like $id. Configured minimum length is 3.
Open

    public static function deleteBoard(int $id): void
Severity: Minor
Found in app/Utils/Kanban.php by phpmd

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

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

                $row['sum_fields'] = \App\Json::decode($row['sum_fields']);
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

            }
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

                $rows[$row['fieldid']] = $row;
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

                $fieldModel = \Vtiger_Field_Model::getInstanceFromFieldId($id);
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

                }
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     *
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     * @return array
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

            ->insert('s_#__kanban_boards', [
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     * @return array
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

            foreach ($rows as $id => $row) {
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

    /**
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     * @param bool   $privileges
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

                $row['detail_fields'] = \App\Json::decode($row['detail_fields']);
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

Line exceeds 120 characters; contains 129 characters
Open

        if ($row = (new \App\Db\Query())->from('s_#__kanban_boards')->where(['id' => $id])->one(\App\Db::getInstance('admin'))) {
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

    /**
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

    {
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

                ->orderBy(['sequence' => SORT_ASC])
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

            $rows = [];
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

        }
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

                $row[$type] = \App\Json::decode($row[$type]);
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     *
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     * @return void
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

        return $row ?: [];
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

                'tabid' => $fieldModel->getModuleId(),
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

            while ($row = $dataReader->read()) {
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     * Get board by id.
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     * @param int $id
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

            ->from('s_#__kanban_boards')
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

    }
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

    }
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     *
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

            $dataReader = (new \App\Db\Query())->from('s_#__kanban_boards')
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

            $rows = \App\Cache::get('KanbanGetBoards', $moduleName);
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

            }
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

    public static function getBoards(string $moduleName, bool $privileges = false): array
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

            \App\Cache::save('KanbanGetBoards', $moduleName, $rows);
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

        if ($privileges) {
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

    public static function getBoard(int $id): array
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

    {
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

            foreach (['detail_fields', 'sum_fields'] as $type) {
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     */
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

        $fields[] = $fieldModel->getModule()->getAlphabetSearchField();
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     *
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

                ->createCommand(\App\Db::getInstance('admin'))->query();
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     *
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

        $sequence = (new \App\Db\Query())
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

            ->where(['tabid' => $fieldModel->getModuleId()])
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

            }
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

        }
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

        }
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     * Add boards.
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

    public static function addBoard(int $fieldId): void
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

        $fieldModel = \Vtiger_Field_Model::getInstanceFromFieldId($fieldId);
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

    /**
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     * Get boards by module name.
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     * @param string $moduleName
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

        if (!\App\Cache::has('KanbanGetBoards', $moduleName)) {
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

        } else {
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

        return $rows;
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

        \App\Db::getInstance('admin')->createCommand()
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     * Update boards.
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     * @param int    $id
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     * @param string $type
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     * @return void
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     * @return void
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     * @param string $moduleName
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

                    unset($board[$type][$key]);
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

                ->where(['tabid' => \App\Module::getModuleId($moduleName)])
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

                if (!$fieldModel->isAjaxEditable()) {
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

                    unset($rows[$id]);
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     */
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     * @param int $fieldId
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

        $fields = ['assigned_user_id'];
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

                'sum_fields' => '[]',
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

            ->update('s_#__kanban_boards', [$type => \App\Json::encode($value)], ['id' => $id])
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     *
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     *  @return \Vtiger_Field_Model[]
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

        return $fields;
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

    /**
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     *
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     */
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

        if ($row = (new \App\Db\Query())->from('s_#__kanban_boards')->where(['id' => $id])->one(\App\Db::getInstance('admin'))) {
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

    {
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

            ->max('sequence') ?? 0;
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     * @param array  $rows
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

        }
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

                $fields[$fieldModel->getId()] = $fieldModel;
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     * Remove field from kanban board.
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     * @param string $fieldName
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

        }
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

        $row = self::getBoard($id);
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

        self::clearCache($moduleName);
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     * @param int $id
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

        foreach ($moduleModel->getFieldsByType(['picklist', 'owner'], true) as $fieldModel) {
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

        \App\Cache::delete('KanbanGetBoards', $moduleName);
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     * @param string $moduleName
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

        foreach (self::getBoards($moduleName) as $board) {
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

    {
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

        self::clearCache(\App\Module::getModuleName($row['tabid']));
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

                    self::updateBoard($board['id'], $type, $board[$type]);
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

        foreach ($rows as $seq => $id) {
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     * @return void
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

            }
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

                }
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

                'detail_fields' => \App\Json::encode($fields),
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

                'sequence' => $sequence + 1,
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

    }
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

    {
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

    /**
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

    }
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     *
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

        }
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     * Clear cache for module.
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

    {
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

    public static function updateBoard(int $id, string $type, array $value): void
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

    public static function updateSequence(string $moduleName, array $rows): void
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

            self::clearCache(\App\Module::getModuleName($row['tabid']));
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

    public static function getSupportedFields(string $moduleName): array
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

    public static function clearCache(string $moduleName)
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

    public static function deleteField(string $moduleName, string $fieldName)
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     *
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

    /**
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

        $createCommand = \App\Db::getInstance('admin')->createCommand();
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

    /**
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

    /**
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

    }
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

            foreach (['detail_fields', 'sum_fields'] as $type) {
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     *
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

    {
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

            if ($fieldModel->isAjaxEditable()) {
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

    /**
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     * @param array  $value
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     * @param string $moduleName
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

    }
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     *
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     */
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

    }
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     *
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

        \App\Db::getInstance('admin')->createCommand()
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     */
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     */
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

        $moduleModel = \Vtiger_Module_Model::getInstance($moduleName);
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     * @param string $moduleName
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     *
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

            ->execute();
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     *
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

        if ($row = self::getBoard($id)) {
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

        $fields = [];
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

                if (false !== ($key = array_search($fieldName, $board[$type]))) {
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

                'fieldid' => $fieldId,
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

            $createCommand->update('s_#__kanban_boards', ['sequence' => $seq], ['id' => $id])->execute();
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

    public static function deleteBoard(int $id): void
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

                ->execute();
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

        }
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     */
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

        self::clearCache($fieldModel->getModuleName());
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     */
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

    }
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

    {
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

            \App\Db::getInstance('admin')->createCommand()
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     *
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     *
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     */
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

            }
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

            ])->execute();
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     * Update boards sequence boards.
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     * Delete boards.
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

                ->delete('s_#__kanban_boards', ['id' => $id])
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

     * Get supported fields.
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

    {
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

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

    }
Severity: Minor
Found in app/Utils/Kanban.php by phpcodesniffer

There are no issues that match your filters.

Category
Status