YetiForceCompany/YetiForceCRM

View on GitHub
app/Conditions/QueryFields/SharedOwnerField.php

Summary

Maintainability
B
5 hrs
Test Coverage
F
0%

Missing class import via use statement (line '95', column '49').
Open

            $condition = [$this->getColumnName() => (new \yii\db\Expression('0=1'))];

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

            $query = (new \App\Db\Query())->select(['crmid'])->from('u_#__crmentity_showners')

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

            $query = (new \App\Db\Query())->select(['crmid'])->from('u_#__crmentity_showners')

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

        return [$this->getColumnName() => (new \App\Db\Query())->select(['crmid'])->from('u_#__crmentity_showners')->where(['userid' => explode('##', $this->value)])];

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

            $query = (new \App\Db\Query())->select(['crmid'])->from('u_#__crmentity_showners')

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

            $query = (new \App\Db\Query())->select(['crmid'])->from('u_#__crmentity_showners');

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

        return ['NOT IN', $this->getColumnName(), (new \App\Db\Query())->select(['crmid'])->from('u_#__crmentity_showners')->where(['userid' => explode('##', $this->value)])];

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

                $where[] = ['u_#__crmentity_showners.userid' => (new \App\Db\Query())->select(['userid'])->from(["condition_groups_{$groupId}_" . \App\Layout::getUniqueId() => \App\PrivilegeUtil::getQueryToUsersByGroup((int) $groupId)])];

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

            $query = (new \App\Db\Query())->select(['crmid'])->from('u_#__crmentity_showners')

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 '\App\PrivilegeUtil' in method 'operatorOgu'.
Open

                $where[] = ['u_#__crmentity_showners.userid' => (new \App\Db\Query())->select(['userid'])->from(["condition_groups_{$groupId}_" . \App\Layout::getUniqueId() => \App\PrivilegeUtil::getQueryToUsersByGroup((int) $groupId)])];

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\Layout' in method 'operatorOgu'.
Open

                $where[] = ['u_#__crmentity_showners.userid' => (new \App\Db\Query())->select(['userid'])->from(["condition_groups_{$groupId}_" . \App\Layout::getUniqueId() => \App\PrivilegeUtil::getQueryToUsersByGroup((int) $groupId)])];

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

        } else {
            $focus = $this->queryGenerator->getEntityModel();
            $query = (new \App\Db\Query())->select(['crmid'])->from('u_#__crmentity_showners')
                ->innerJoin($focus->table_name, "u_#__crmentity_showners.crmid={$focus->table_name}.{$focus->table_index}");
        }

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\User' in method 'operatorOm'.
Open

        $this->value = \App\User::getCurrentUserId();

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

        } else {
            $condition = [$this->getColumnName() => (new \yii\db\Expression('0=1'))];
        }

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

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

The method operatorNy uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            $focus = $this->queryGenerator->getEntityModel();
            $query = (new \App\Db\Query())->select(['crmid'])->from('u_#__crmentity_showners')
                ->innerJoin($focus->table_name, "u_#__crmentity_showners.crmid={$focus->table_name}.{$focus->table_index}");
        }

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

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

        return [$this->getColumnName() => (new \App\Db\Query())->select(['crmid'])->from('u_#__crmentity_showners')->where(['userid' => explode('##', $this->value)])];

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

        return [$this->getColumnName() => (new \App\Db\Query())->select(['crmid'])->from('u_#__crmentity_showners')->where(['userid' => explode('##', $this->value)])];

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

            $fieldModel = $this->queryGenerator->getModuleField($this->related['sourceField']);

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 "u_#__crmentity_showners" 7 times.
Open

        return [$this->getColumnName() => (new \App\Db\Query())->select(['crmid'])->from('u_#__crmentity_showners')->where(['userid' => explode('##', $this->value)])];

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::select
Open

            $query = (new \App\Db\Query())->select(['crmid'])->from('u_#__crmentity_showners')

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

            $query = (new \App\Db\Query())->select(['crmid'])->from('u_#__crmentity_showners')

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

        $this->value = \App\User::getCurrentUserId();

Call to method getEntityModel from undeclared class \App\QueryGenerator (Did you mean class \Tests\App\QueryGenerator)
Open

            $focus = $this->queryGenerator->getEntityModel();

Call to method getModuleField from undeclared class \App\QueryGenerator (Did you mean class \Tests\App\QueryGenerator)
Open

            $fieldModel = $this->queryGenerator->getModuleField($this->related['sourceField']);

Call to method getEntityModel from undeclared class \App\QueryGenerator (Did you mean class \Tests\App\QueryGenerator)
Open

        $focus = $this->queryGenerator->getEntityModel();

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

            $query = (new \App\Db\Query())->select(['crmid'])->from('u_#__crmentity_showners')

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

            $query = (new \App\Db\Query())->select(['crmid'])->from('u_#__crmentity_showners');

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

                $where[] = ['u_#__crmentity_showners.userid' => (new \App\Db\Query())->select(['userid'])->from(["condition_groups_{$groupId}_" . \App\Layout::getUniqueId() => \App\PrivilegeUtil::getQueryToUsersByGroup((int) $groupId)])];

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

        return [$this->getColumnName() => (new \App\Db\Query())->select(['crmid'])->from('u_#__crmentity_showners')->where(['userid' => explode('##', $this->value)])];

Call to method __construct from undeclared class \yii\db\Expression
Open

            $condition = [$this->getColumnName() => (new \yii\db\Expression('0=1'))];

Call to method getModuleField from undeclared class \App\QueryGenerator (Did you mean class \Tests\App\QueryGenerator)
Open

            $fieldModel = $this->queryGenerator->getModuleField($this->related['sourceField']);

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

            $query = (new \App\Db\Query())->select(['crmid'])->from('u_#__crmentity_showners')

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

        return ['NOT IN', $this->getColumnName(), (new \App\Db\Query())->select(['crmid'])->from('u_#__crmentity_showners')->where(['userid' => explode('##', $this->value)])];

Call to method getModuleField from undeclared class \App\QueryGenerator (Did you mean class \Tests\App\QueryGenerator)
Open

            $fieldModel = $this->queryGenerator->getModuleField($this->related['sourceField']);

Call to method getInstance from undeclared class \App\Fields\Owner
Open

        $this->value = implode('##', array_keys(\App\Fields\Owner::getInstance($this->getModuleName())->getGroups(false, 'private')));

Call to method getEntityModel from undeclared class \App\QueryGenerator (Did you mean class \Tests\App\QueryGenerator)
Open

            $focus = $this->queryGenerator->getEntityModel();

Call to method getInstance from undeclared class \App\Fields\Owner
Open

        $groups = \App\Fields\Owner::getInstance($this->getModuleName())->getGroups(false, 'private');

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

        if ($this->related) {
            $fieldModel = $this->queryGenerator->getModuleField($this->related['sourceField']);
            $query = (new \App\Db\Query())->select(['crmid'])->from('u_#__crmentity_showners')
                ->innerJoin($fieldModel->getTableName(), "u_#__crmentity_showners.crmid={$fieldModel->getTableName()}.{$fieldModel->getColumnName()}");
        } else {
Severity: Major
Found in app/Conditions/QueryFields/SharedOwnerField.php and 1 other location - About 2 hrs to fix
app/Conditions/QueryFields/SharedOwnerField.php on lines 136..144

Duplicated Code

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

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

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

Tuning

This issue has a mass of 140.

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

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

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

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

Refactorings

Further Reading

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

        if ($this->related) {
            $fieldModel = $this->queryGenerator->getModuleField($this->related['sourceField']);
            $query = (new \App\Db\Query())->select(['crmid'])->from('u_#__crmentity_showners')
                ->innerJoin($fieldModel->getTableName(), "u_#__crmentity_showners.crmid={$fieldModel->getTableName()}.{$fieldModel->getColumnName()}");
        } else {
Severity: Major
Found in app/Conditions/QueryFields/SharedOwnerField.php and 1 other location - About 2 hrs to fix
app/Conditions/QueryFields/SharedOwnerField.php on lines 117..125

Duplicated Code

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

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

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

Tuning

This issue has a mass of 140.

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

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

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

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

Refactorings

Further Reading

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

    {

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

        $focus = $this->queryGenerator->getEntityModel();

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

    }

Line exceeds 120 characters; contains 175 characters
Open

        return ['NOT IN', $this->getColumnName(), (new \App\Db\Query())->select(['crmid'])->from('u_#__crmentity_showners')->where(['userid' => explode('##', $this->value)])];

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

     * Currently logged-in user groups.

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

    {

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

        return ['NOT IN', $this->getColumnName(), (new \App\Db\Query())->select(['crmid'])->from('u_#__crmentity_showners')->where(['userid' => explode('##', $this->value)])];

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

    }

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

    /**

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

    {

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

     * Currently logged user.

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

    {

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

    /**

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

    {

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

    }

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

    public function operatorOm()

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

        return $this->operatorE();

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

        }

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

     *

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

     *

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

     */

Line exceeds 120 characters; contains 167 characters
Open

        return [$this->getColumnName() => (new \App\Db\Query())->select(['crmid'])->from('u_#__crmentity_showners')->where(['userid' => explode('##', $this->value)])];

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

     * @return array

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

     *

Line exceeds 120 characters; contains 134 characters
Open

        $this->value = implode('##', array_keys(\App\Fields\Owner::getInstance($this->getModuleName())->getGroups(false, 'private')));

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

        }

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

            return [];

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

     * Not equal operator.

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

            return [];

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

     * Users who belong to the same group as the currently logged in user.

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

                ->innerJoin($focus->table_name, "u_#__crmentity_showners.crmid={$focus->table_name}.{$focus->table_index}");

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

    public function operatorY(): array

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

        if ($this->related) {

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

            $fieldModel = $this->queryGenerator->getModuleField($this->related['sourceField']);

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

     */

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

            return $this->fullColumnName;

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

     *

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

     * @return array

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

    public function operatorOgr(): array

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

        if (empty($this->value)) {

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

        }

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

     * @return array

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

     */

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

    public function operatorNy(): array

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

    }

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

            $query = (new \App\Db\Query())->select(['crmid'])->from('u_#__crmentity_showners')

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

        return $this->fullColumnName = "{$focus->table_name}.{$focus->table_index}";

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

    /**

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

    public function operatorN(): array

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

        $this->value = \App\User::getCurrentUserId();

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

    }

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

     * @return array

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

    {

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

        if ($groups) {

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

    public function getColumnName(): string

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

     * @return array

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

    /**

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

    }

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

    /**

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

            }

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

        } else {

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

        return $condition;

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

     * @return array

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

    {

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

            $query = (new \App\Db\Query())->select(['crmid'])->from('u_#__crmentity_showners')

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

    /** {@inheritdoc} */

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

     */

Line exceeds 120 characters; contains 151 characters
Open

                ->innerJoin($fieldModel->getTableName(), "u_#__crmentity_showners.crmid={$fieldModel->getTableName()}.{$fieldModel->getColumnName()}");

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

            $fieldModel = $this->queryGenerator->getModuleField($this->related['sourceField']);

Line exceeds 120 characters; contains 151 characters
Open

                ->innerJoin($fieldModel->getTableName(), "u_#__crmentity_showners.crmid={$fieldModel->getTableName()}.{$fieldModel->getColumnName()}");

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

     * Equals operator.

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

    public function operatorE(): array

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

        }

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

        return $this->operatorE();

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

            $condition = [$this->getColumnName() => (new \yii\db\Expression('0=1'))];

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

    }

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

     */

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

            return $this->fullColumnName = "{$fieldModel->getTableName()}.{$fieldModel->getColumnName()}";

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

        return [$this->getColumnName() => (new \App\Db\Query())->select(['crmid'])->from('u_#__crmentity_showners')->where(['userid' => explode('##', $this->value)])];

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

     */

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

            $query = (new \App\Db\Query())->select(['crmid'])->from('u_#__crmentity_showners');

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

        return $this->operatorE();

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

            $fieldModel = $this->queryGenerator->getModuleField($this->related['sourceField']);

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

        } else {

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

    /**

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

            $query = (new \App\Db\Query())->select(['crmid'])->from('u_#__crmentity_showners')

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

     * Is empty operator.

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

     */

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

        if ($this->related) {

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

                $where[] = ['u_#__crmentity_showners.userid' => (new \App\Db\Query())->select(['userid'])->from(["condition_groups_{$groupId}_" . \App\Layout::getUniqueId() => \App\PrivilegeUtil::getQueryToUsersByGroup((int) $groupId)])];

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

        }

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

     *

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

    }

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

     * @return array

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

        return ['NOT IN', $this->getColumnName(), $query];

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

            $condition = [$this->getColumnName() => $query->where($where)];

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

    /**

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

            $focus = $this->queryGenerator->getEntityModel();

Line exceeds 120 characters; contains 124 characters
Open

                ->innerJoin($focus->table_name, "u_#__crmentity_showners.crmid={$focus->table_name}.{$focus->table_index}");

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

     * Is not empty operator.

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

        if ($this->related) {

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

     *

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

                ->innerJoin($fieldModel->getTableName(), "u_#__crmentity_showners.crmid={$fieldModel->getTableName()}.{$fieldModel->getColumnName()}");

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

                ->innerJoin($focus->table_name, "u_#__crmentity_showners.crmid={$focus->table_name}.{$focus->table_index}");

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

    public function operatorOgu(): array

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

            $where = ['or'];

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

            foreach (array_keys($groups) as $groupId) {

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

    {

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

     *

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

     * @return array

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

    }

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

        if ($this->fullColumnName) {

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

        if (empty($this->value)) {

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

        $this->value = implode('##', array_keys(\App\Fields\Owner::getInstance($this->getModuleName())->getGroups(false, 'private')));

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

     *

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

     * Contains operator.

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

    /**

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

    {

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

        }

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

        $groups = \App\Fields\Owner::getInstance($this->getModuleName())->getGroups(false, 'private');

Line exceeds 120 characters; contains 238 characters
Open

                $where[] = ['u_#__crmentity_showners.userid' => (new \App\Db\Query())->select(['userid'])->from(["condition_groups_{$groupId}_" . \App\Layout::getUniqueId() => \App\PrivilegeUtil::getQueryToUsersByGroup((int) $groupId)])];

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

     */

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

        }

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

        return [$this->getColumnName() => $query];

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

            $focus = $this->queryGenerator->getEntityModel();

Line exceeds 120 characters; contains 124 characters
Open

                ->innerJoin($focus->table_name, "u_#__crmentity_showners.crmid={$focus->table_name}.{$focus->table_index}");

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

    public function operatorC(): array

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

            $query = (new \App\Db\Query())->select(['crmid'])->from('u_#__crmentity_showners')

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

                ->innerJoin($fieldModel->getTableName(), "u_#__crmentity_showners.crmid={$fieldModel->getTableName()}.{$fieldModel->getColumnName()}");

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

        } else {

There are no issues that match your filters.

Category
Status