YetiForceCompany/YetiForceCRM

View on GitHub
vtlib/Vtiger/Filter.php

Summary

Maintainability
A
1 hr
Test Coverage
F
48%

Method __create has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function __create($moduleInstance)
    {
        $this->module = $moduleInstance;
        $this->isdefault = (true === $this->isdefault || 'true' == $this->isdefault) ? 1 : 0;
        $this->inmetrics = (true === $this->inmetrics || 'true' == $this->inmetrics) ? 1 : 0;
Severity: Minor
Found in vtlib/Vtiger/Filter.php - About 1 hr to fix

    Function __create has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

        public function __create($moduleInstance)
        {
            $this->module = $moduleInstance;
            $this->isdefault = (true === $this->isdefault || 'true' == $this->isdefault) ? 1 : 0;
            $this->inmetrics = (true === $this->inmetrics || 'true' == $this->inmetrics) ? 1 : 0;
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php - About 35 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

    The class Filter has a coupling between objects value of 13. Consider to reduce the number of dependencies under 13.
    Open

    class Filter
    {
        /** ID of this filter instance */
        public $id;
        public $name;
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpmd

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

                $result = (new \App\Db\Query())->from('vtiger_customview')->where(['viewname' => $value, 'entitytype' => $moduleName])->one();
    Severity: Minor
    Found in vtlib/Vtiger/Filter.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 '152', column '77').
    Open

            $db->createCommand()->update('vtiger_cvcolumnlist', ['columnindex' => new \yii\db\Expression('columnindex + 1')], ['and', ['cvid' => $this->id], ['>=', 'columnindex', $index]])->execute();
    Severity: Minor
    Found in vtlib/Vtiger/Filter.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 getInstance has a boolean flag argument $module, which is a certain sign of a Single Responsibility Principle violation.
    Open

        public static function getInstance($value, $module = false)
    Severity: Minor
    Found in vtlib/Vtiger/Filter.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

    Missing class import via use statement (line '221', column '22').
    Open

            $dataReader = (new \App\Db\Query())->from('vtiger_customview')
    Severity: Minor
    Found in vtlib/Vtiger/Filter.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 save has a boolean flag argument $moduleInstance, which is a certain sign of a Single Responsibility Principle violation.
    Open

        public function save($moduleInstance = false)
    Severity: Minor
    Found in vtlib/Vtiger/Filter.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

    Missing class import via use statement (line '58', column '21').
    Open

                $sequence = (new \App\Db\Query())->from('vtiger_customview')
    Severity: Minor
    Found in vtlib/Vtiger/Filter.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 initialize has a boolean flag argument $module, which is a certain sign of a Single Responsibility Principle violation.
    Open

        public function initialize($valuemap, $module = false)
    Severity: Minor
    Found in vtlib/Vtiger/Filter.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

    Missing class import via use statement (line '239', column '17').
    Open

            $cvIds = (new \App\Db\Query())->from('vtiger_customview')->where(['entitytype' => $moduleInstance->name])->column();
    Severity: Minor
    Found in vtlib/Vtiger/Filter.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

    Avoid using static access to class '\App\CustomView' in method 'getInstance'.
    Open

                $result = \App\CustomView::getCVDetails((int) $value, $moduleName ?: null);
    Severity: Minor
    Found in vtlib/Vtiger/Filter.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\Log' in method '__create'.
    Open

            \App\Log::trace("Creating Filter $this->name ... DONE", __METHOD__);
    Severity: Minor
    Found in vtlib/Vtiger/Filter.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\CustomView' in method 'deleteForModule'.
    Open

                \App\CustomView::clearCacheById($cvId, $moduleInstance->name);
    Severity: Minor
    Found in vtlib/Vtiger/Filter.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 'vtlib\Module' in method 'initialize'.
    Open

            $this->module = Module::getInstance($module ?: $valuemap['tabid']);
    Severity: Minor
    Found in vtlib/Vtiger/Filter.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\Log' in method '__update'.
    Open

            \App\Log::trace("Updating Filter $this->name ... DONE", __METHOD__);
    Severity: Minor
    Found in vtlib/Vtiger/Filter.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 'vtlib\Utils' in method 'getInstance'.
    Open

            if (Utils::isNumber($value)) {
    Severity: Minor
    Found in vtlib/Vtiger/Filter.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\CustomView' in method '__delete'.
    Open

            \App\CustomView::clearCacheById($this->id, $this->module->name);
    Severity: Minor
    Found in vtlib/Vtiger/Filter.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\Log' in method 'addRule'.
    Open

            \App\Log::trace('Adding Condition', __METHOD__);
    Severity: Minor
    Found in vtlib/Vtiger/Filter.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 getInstance uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
    Open

            } else {
                $result = (new \App\Db\Query())->from('vtiger_customview')->where(['viewname' => $value, 'entitytype' => $moduleName])->one();
            }
    Severity: Minor
    Found in vtlib/Vtiger/Filter.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\Db' in method '__create'.
    Open

            $db = \App\Db::getInstance();
    Severity: Minor
    Found in vtlib/Vtiger/Filter.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 'addField'.
    Open

            $db = \App\Db::getInstance();
    Severity: Minor
    Found in vtlib/Vtiger/Filter.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\Log' in method 'addField'.
    Open

            \App\Log::trace("Adding $fieldInstance->name to $this->name filter ... DONE", __METHOD__);
    Severity: Minor
    Found in vtlib/Vtiger/Filter.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 save uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
    Open

            } else {
                $this->__create($moduleInstance);
            }
    Severity: Minor
    Found in vtlib/Vtiger/Filter.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 '\CustomView_Record_Model' in method 'addRule'.
    Open

            $cvRecordModel = \CustomView_Record_Model::getCleanInstance();
    Severity: Minor
    Found in vtlib/Vtiger/Filter.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 __create uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
    Open

                else {
                    $this->status = '3';
                } // Public
    Severity: Minor
    Found in vtlib/Vtiger/Filter.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\Module' in method 'getInstance'.
    Open

            $moduleName = is_numeric($module) ? \App\Module::getModuleName($module) : $module;
    Severity: Minor
    Found in vtlib/Vtiger/Filter.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 "vtiger_customview" 7 times.
    Open

                $sequence = (new \App\Db\Query())->from('vtiger_customview')
    Severity: Critical
    Found in vtlib/Vtiger/Filter.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 "viewname" 3 times.
    Open

            $this->name = $valuemap['viewname'];
    Severity: Critical
    Found in vtlib/Vtiger/Filter.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 "entitytype" 6 times.
    Open

                    ->where(['entitytype' => $this->module->name])
    Severity: Critical
    Found in vtlib/Vtiger/Filter.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 "columnindex" 3 times.
    Open

            $db->createCommand()->update('vtiger_cvcolumnlist', ['columnindex' => new \yii\db\Expression('columnindex + 1')], ['and', ['cvid' => $this->id], ['>=', 'columnindex', $index]])->execute();
    Severity: Critical
    Found in vtlib/Vtiger/Filter.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.

    Assigning '3' to property but \vtlib\Filter->status is false
    Open

                    $this->status = '3';
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phan

    Call to method trace from undeclared class \App\Log
    Open

            \App\Log::trace("Updating Filter $this->name ... DONE", __METHOD__);
    Severity: Critical
    Found in vtlib/Vtiger/Filter.php by phan

    Reference to undeclared property \vtlib\Filter->sequence
    Open

            if (!isset($this->sequence)) {
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phan

    Assigning 0|1 to property but \vtlib\Filter->inmetrics is false
    Open

            $this->inmetrics = (true === $this->inmetrics || 'true' == $this->inmetrics) ? 1 : 0;
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phan

    Call to method trace from undeclared class \App\Log
    Open

            \App\Log::trace("Creating Filter $this->name ... DONE", __METHOD__);
    Severity: Critical
    Found in vtlib/Vtiger/Filter.php by phan

    Saw possibly unextractable annotation for a fragment of comment '* @param Module Instance of the module to which this filter should be associated with': after Module, did not see an element name (will guess based on comment order)
    Open

         * @param Module Instance of the module to which this filter should be associated with
    Severity: Info
    Found in vtlib/Vtiger/Filter.php by phan

    Reference to undeclared property \vtlib\Filter->sequence (Did you mean $sequence)
    Open

                'sequence' => $this->sequence,
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phan

    Assigning '0' to property but \vtlib\Filter->status is false
    Open

                    $this->status = '0';
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phan

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

            \App\Db::getInstance()->createCommand()->delete('vtiger_customview', ['cvid' => $this->id])->execute();
    Severity: Critical
    Found in vtlib/Vtiger/Filter.php by phan

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

                $sequence = (new \App\Db\Query())->from('vtiger_customview')
    Severity: Critical
    Found in vtlib/Vtiger/Filter.php by phan

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

            $db->createCommand()->insert('vtiger_customview', [
    Severity: Critical
    Found in vtlib/Vtiger/Filter.php by phan

    Saw possibly unextractable annotation for a fragment of comment '* @param Module Instance of the module to use': after Module, did not see an element name (will guess based on comment order)
    Open

         * @param Module Instance of the module to use
    Severity: Info
    Found in vtlib/Vtiger/Filter.php by phan

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

            $dataReader = (new \App\Db\Query())->from('vtiger_customview')
    Severity: Critical
    Found in vtlib/Vtiger/Filter.php by phan

    Expected @param annotation for value to be before the @param annotation for module
    Open

         * @param mixed $module Mixed id or name of the module
    Severity: Info
    Found in vtlib/Vtiger/Filter.php by phan

    Expected @param annotation for valuemap to be before the @param annotation for module
    Open

         * @param mixed $module   Mixed id or name of the module
    Severity: Info
    Found in vtlib/Vtiger/Filter.php by phan

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

            $db->createCommand()->update('vtiger_cvcolumnlist', ['columnindex' => new \yii\db\Expression('columnindex + 1')], ['and', ['cvid' => $this->id], ['>=', 'columnindex', $index]])->execute();
    Severity: Critical
    Found in vtlib/Vtiger/Filter.php by phan

    Returning type array<int>|array{}</int> but getAllForModule() is declared to return \vtlib\Filter
    Open

            return $instances;
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phan

    Saw possibly unextractable annotation for a fragment of comment '* @param mixed filterid or filtername': after mixed, did not see an element name (will guess based on comment order)
    Open

         * @param mixed filterid or filtername
    Severity: Info
    Found in vtlib/Vtiger/Filter.php by phan

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

                $result = (new \App\Db\Query())->from('vtiger_customview')->where(['viewname' => $value, 'entitytype' => $moduleName])->one();
    Severity: Critical
    Found in vtlib/Vtiger/Filter.php by phan

    Reference to undeclared property \vtlib\Filter->sequence (Did you mean $sequence)
    Open

                $this->sequence = $sequence ? (int) $sequence + 1 : 0;
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phan

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

            \App\Db::getInstance()->createCommand()->delete('vtiger_customview', ['entitytype' => $moduleInstance->name])->execute();
    Severity: Critical
    Found in vtlib/Vtiger/Filter.php by phan

    Argument 2 (moduleName) is false but \App\CustomView::clearCacheById() takes null|string defined at /code/app/CustomView.php:763
    Open

            \App\CustomView::clearCacheById($this->id, $this->module->name);
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phan

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

            $db->createCommand()->insert('vtiger_cvcolumnlist', [
    Severity: Critical
    Found in vtlib/Vtiger/Filter.php by phan

    @throws type of addRule has undeclared type \yii\db\Exception (Did you mean class \Exception)
    Open

        public function addRule(array $conditions)
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phan

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

            $cvIds = (new \App\Db\Query())->from('vtiger_customview')->where(['entitytype' => $moduleInstance->name])->column();
    Severity: Critical
    Found in vtlib/Vtiger/Filter.php by phan

    Argument 2 (moduleName) is false but \App\CustomView::clearCacheById() takes null|string defined at /code/app/CustomView.php:763
    Open

                \App\CustomView::clearCacheById($cvId, $moduleInstance->name);
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phan

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

            $db->createCommand()->update('vtiger_cvcolumnlist', ['columnindex' => new \yii\db\Expression('columnindex + 1')], ['and', ['cvid' => $this->id], ['>=', 'columnindex', $index]])->execute();
    Severity: Critical
    Found in vtlib/Vtiger/Filter.php by phan

    Reference to undeclared property \vtlib\FieldBasic->sourcefieldname
    Open

                'source_field_name' => $fieldInstance->sourcefieldname ?? null
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phan

    Suspicious type false of a variable or expression used to build a string. (Expected type to be able to cast to a string)
    Open

            return "$fieldInstance->table:$fieldInstance->column:$fieldInstance->name:$displayinfo";
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phan

    Call to method trace from undeclared class \App\Log
    Open

            \App\Log::trace("Adding $fieldInstance->name to $this->name filter ... DONE", __METHOD__);
    Severity: Critical
    Found in vtlib/Vtiger/Filter.php by phan

    Call to method trace from undeclared class \App\Log
    Open

            \App\Log::trace('Adding Condition', __METHOD__);
    Severity: Critical
    Found in vtlib/Vtiger/Filter.php by phan

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

        public $id;
    Severity: Minor
    Found in vtlib/Vtiger/Filter.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 $db. Configured minimum length is 3.
    Open

            $db = \App\Db::getInstance();
    Severity: Minor
    Found in vtlib/Vtiger/Filter.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 $db. Configured minimum length is 3.
    Open

            $db = \App\Db::getInstance();
    Severity: Minor
    Found in vtlib/Vtiger/Filter.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

        public function __create($moduleInstance)
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         * Delete this instance.
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        {
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            $db->createCommand()->update('vtiger_cvcolumnlist', ['columnindex' => new \yii\db\Expression('columnindex + 1')], ['and', ['cvid' => $this->id], ['>=', 'columnindex', $index]])->execute();
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

                'columnindex' => $index,
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         * @return $this
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

                return $this;
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            $cvRecordModel->setConditionsForFilter();
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        {
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         * @return self
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

                $this->sequence = $sequence ? (int) $sequence + 1 : 0;
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

                else {
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

                'entitytype' => $this->module->name,
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            \App\CustomView::clearCacheById($this->id, $this->module->name);
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        {
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         * @return string
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            $tod = explode('~', $fieldInstance->typeofdata);
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        }
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        /**
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

                $instance->initialize($result, $module);
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            ])->execute();
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            \App\Db::getInstance()->createCommand()->delete('vtiger_customview', ['cvid' => $this->id])->execute();
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        /**
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            } else {
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         */
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            $displayinfo = $fieldInstance->getModuleName() . '_' . str_replace(' ', '_', $fieldInstance->label) . ':' . $tod[0];
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         */
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        }
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         * @param mixed filterid or filtername
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

                $result = (new \App\Db\Query())->from('vtiger_customview')->where(['viewname' => $value, 'entitytype' => $moduleName])->one();
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

    Line exceeds 120 characters; contains 138 characters
    Open

                $result = (new \App\Db\Query())->from('vtiger_customview')->where(['viewname' => $value, 'entitytype' => $moduleName])->one();
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        {
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

                    $this->status = '0';
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

                    $this->status = '3';
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

                } // Public
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

                'description' => $this->description,
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        /**
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         */
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            }
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        public function delete()
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        {
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         * @throws \yii\db\Exception
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            }
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            \App\Log::trace('Adding Condition', __METHOD__);
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

                ->where(['entitytype' => $moduleInstance->name])
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

                ->createCommand()->query();
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            while ($row = $dataReader->read()) {
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            }
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         * @param ModuleBasic $moduleInstance
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            \App\Db::getInstance()->createCommand()->delete('vtiger_customview', ['entitytype' => $moduleInstance->name])->execute();
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        public $inmetrics = false;
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        public $entitytype = false;
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         */
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

                'featured' => $this->featured,
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            \App\Log::trace("Updating Filter $this->name ... DONE", __METHOD__);
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         */
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        }
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         * Add rule to this filter instance.
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            $cvRecordModel = \CustomView_Record_Model::getCleanInstance();
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

                $instance = new self();
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        public static function deleteForModule(ModuleBasic $moduleInstance)
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

    Line exceeds 120 characters; contains 124 characters
    Open

            $cvIds = (new \App\Db\Query())->from('vtiger_customview')->where(['entitytype' => $moduleInstance->name])->column();
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        public $module;
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         * @param mixed $valuemap
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        public function initialize($valuemap, $module = false)
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        /**
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

                'sequence' => $this->sequence,
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        public function __delete()
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        {
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         * @param mixed $moduleInstance
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         * @param FieldBasic $fieldInstance
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         */
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

    Line exceeds 120 characters; contains 129 characters
    Open

            \App\Db::getInstance()->createCommand()->delete('vtiger_customview', ['entitytype' => $moduleInstance->name])->execute();
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            $this->id = $valuemap['cvid'];
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         * @param Module Instance of the module to which this filter should be associated with
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            $this->inmetrics = (true === $this->inmetrics || 'true' == $this->inmetrics) ? 1 : 0;
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            }
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

                'setdefault' => $this->isdefault,
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         * Get the column value to use in custom view tables.
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            ])->execute();
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            \App\Log::trace("Adding $fieldInstance->name to $this->name filter ... DONE", __METHOD__);
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        public static function getInstance($value, $module = false)
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        }
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        public $presence = 1;
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

                    ->max('sequence');
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            if (!isset($this->status)) {
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            }
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            $db = \App\Db::getInstance();
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        }
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         */
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

                $this->__update();
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            $this->__delete();
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        /**
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        {
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        /**
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         * @return $this
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         * Get all instances of filter for the module.
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        /** ID of this filter instance */
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        public $id;
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        public $name;
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        public $description;
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            $this->module = Module::getInstance($module ?: $valuemap['tabid']);
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        }
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

                    ->where(['entitytype' => $this->module->name])
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        public function __update()
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         * @param int        $index
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         */
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        public function addField(FieldBasic $fieldInstance, $index = 0)
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

                'cvid' => $this->id,
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        {
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            $cvRecordModel->set('advfilterlist', $conditions);
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

                $result = \App\CustomView::getCVDetails((int) $value, $moduleName ?: null);
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            }
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            }
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        public static function getAllForModule(ModuleBasic $moduleInstance)
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        /**
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        public $status = false; // 5.1.0 onwards
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         * Initialize this filter instance.
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            $this->name = $valuemap['viewname'];
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         * Create this instance.
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        {
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            if (!isset($this->sequence)) {
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            $db->createCommand()->insert('vtiger_customview', [
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            $this->id = $db->getLastInsertID('vtiger_customview_cvid_seq');
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            \App\Log::trace("Creating Filter $this->name ... DONE", __METHOD__);
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        public function save($moduleInstance = false)
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        }
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        /**
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

                $sequence = (new \App\Db\Query())->from('vtiger_customview')
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

                'viewname' => $this->name,
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        /**
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

    Line exceeds 120 characters; contains 124 characters
    Open

            $displayinfo = $fieldInstance->getModuleName() . '_' . str_replace(' ', '_', $fieldInstance->label) . ':' . $tod[0];
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            return $this;
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            $dataReader = (new \App\Db\Query())->from('vtiger_customview')
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            $cvIds = (new \App\Db\Query())->from('vtiger_customview')->where(['entitytype' => $moduleInstance->name])->column();
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        public $privileges = 1;
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         * @param mixed $module   Mixed id or name of the module
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

                if (0 == $this->presence) {
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        public function __getColumnValue(FieldBasic $fieldInstance)
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            return "$fieldInstance->table:$fieldInstance->column:$fieldInstance->name:$displayinfo";
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         * Add the field to this filer instance.
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            $db = \App\Db::getInstance();
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

    Line exceeds 120 characters; contains 196 characters
    Open

            $db->createCommand()->update('vtiger_cvcolumnlist', ['columnindex' => new \yii\db\Expression('columnindex + 1')], ['and', ['cvid' => $this->id], ['>=', 'columnindex', $index]])->execute();
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            return $this;
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            $moduleName = is_numeric($module) ? \App\Module::getModuleName($module) : $module;
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            if (Utils::isNumber($value)) {
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            return $instance;
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

                'status' => $this->status,
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

                'module_name' => $fieldInstance->getModuleName(),
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

                'source_field_name' => $fieldInstance->sourcefieldname ?? null
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        public function addRule(array $conditions)
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            if (empty($conditions)) {
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            $instance = false;
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         * Delete filter associated for module.
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        {
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        public $isdefault;
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        public $sort;
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         * @param mixed $moduleInstance
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         * Delete this instance.
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            if ($this->id) {
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

                $this->__create($moduleInstance);
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        /**
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         *
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         * @param mixed $module Mixed id or name of the module
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         * @param ModuleBasic $moduleInstance
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

                $instance = new self();
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

                $instance->initialize($row, $moduleInstance->id);
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            foreach ($cvIds as $cvId) {
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

                \App\CustomView::clearCacheById($cvId, $moduleInstance->name);
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        public $featured = 0;
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         */
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            $this->module = $moduleInstance;
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            $this->isdefault = (true === $this->isdefault || 'true' == $this->isdefault) ? 1 : 0;
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

                } // Default
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

                'privileges' => $this->privileges,
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

                'sort' => $this->sort,
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        }
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        }
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         * Save this instance.
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            return $this->id;
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        }
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         * @param FieldBasic $fieldInstance
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            $db->createCommand()->insert('vtiger_cvcolumnlist', [
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

                'field_name' => $fieldInstance->name,
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            $cvRecordModel->set('cvid', $this->id);
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            $cvRecordModel->set('advfilterlistDbFormat', true);
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         * @param mixed $value
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            if ($result) {
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            $instances = [];
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            return $instances;
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

                'setmetrics' => $this->inmetrics,
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

                'presence' => $this->presence,
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        {
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         * @param Module Instance of the module to use
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         * @param array $conditions
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         * Get instance by filterid or filtername.
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            } else {
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        /**
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         */
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        {
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

                $instances[] = $instance;
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        }
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

            }
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

         */
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

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

        }
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpcodesniffer

    The method __update is not named in camelCase.
    Open

        public function __update()
        {
            \App\Log::trace("Updating Filter $this->name ... DONE", __METHOD__);
        }
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpmd

    CamelCaseMethodName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name methods.

    Example

    class ClassName {
        public function get_name() {
        }
    }

    Source

    The method __getColumnValue is not named in camelCase.
    Open

        public function __getColumnValue(FieldBasic $fieldInstance)
        {
            $tod = explode('~', $fieldInstance->typeofdata);
            $displayinfo = $fieldInstance->getModuleName() . '_' . str_replace(' ', '_', $fieldInstance->label) . ':' . $tod[0];
            return "$fieldInstance->table:$fieldInstance->column:$fieldInstance->name:$displayinfo";
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpmd

    CamelCaseMethodName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name methods.

    Example

    class ClassName {
        public function get_name() {
        }
    }

    Source

    The method __create is not named in camelCase.
    Open

        public function __create($moduleInstance)
        {
            $this->module = $moduleInstance;
            $this->isdefault = (true === $this->isdefault || 'true' == $this->isdefault) ? 1 : 0;
            $this->inmetrics = (true === $this->inmetrics || 'true' == $this->inmetrics) ? 1 : 0;
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpmd

    CamelCaseMethodName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name methods.

    Example

    class ClassName {
        public function get_name() {
        }
    }

    Source

    The method __delete is not named in camelCase.
    Open

        public function __delete()
        {
            \App\Db::getInstance()->createCommand()->delete('vtiger_customview', ['cvid' => $this->id])->execute();
            \App\CustomView::clearCacheById($this->id, $this->module->name);
        }
    Severity: Minor
    Found in vtlib/Vtiger/Filter.php by phpmd

    CamelCaseMethodName

    Since: 0.2

    It is considered best practice to use the camelCase notation to name methods.

    Example

    class ClassName {
        public function get_name() {
        }
    }

    Source

    There are no issues that match your filters.

    Category
    Status