YetiForceCompany/YetiForceCRM

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

Summary

Maintainability
A
3 hrs
Test Coverage
F
52%

BaseField has 29 functions (exceeds 20 allowed). Consider refactoring.
Open

class BaseField
{
    /**
     * @var \App\QueryGenerator
     */
Severity: Minor
Found in app/Conditions/QueryFields/BaseField.php - About 3 hrs to fix

    The class BaseField has 14 public methods. Consider refactoring BaseField to keep number of public methods under 10.
    Open

    class BaseField
    {
        /**
         * @var \App\QueryGenerator
         */

    TooManyPublicMethods

    Since: 0.1

    A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

    By default it ignores methods starting with 'get' or 'set'.

    Example

    Source https://phpmd.org/rules/codesize.html#toomanypublicmethods

    Class "BaseField" has 29 methods, which is greater than 20 authorized. Split it into smaller classes.
    Open

    class BaseField

    A class that grows too much tends to aggregate too many responsibilities and inevitably becomes harder to understand and therefore to maintain. Above a specific threshold, it is strongly advised to refactor the class into smaller ones which focus on well defined topics.

    Missing class import via use statement (line '362', column '45').
    Open

            return ['<>', $this->getColumnName(), new \yii\db\Expression($this->getColumnNameFromSource())];

    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 getOrderBy has a boolean flag argument $order, which is a certain sign of a Single Responsibility Principle violation.
    Open

        public function getOrderBy($order = false): array

    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

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

        public function __construct(\App\QueryGenerator $queryGenerator, $fieldModel = false)

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

            return [$this->getColumnName() => new \yii\db\Expression($this->getColumnNameFromSource())];

    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\Log' in method 'getCondition'.
    Open

            Log::error("Not found operator: $fn in  " . __CLASS__);

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

            } else {
                $fieldModel = $this->queryGenerator->getModuleField($fieldName);
                $this->queryGenerator->addTableToQuery($fieldModel->getTableName());
            }

    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\Log' in method 'getCondition'.
    Open

                Log::trace("Entering to $fn in " . __CLASS__);

    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

    Rename "$value" which has the same name as the field declared at line 45.
    Open

            $value = $this->getValue();

    Shadowing fields with a local variable is a bad practice that reduces code readability: it makes it confusing to know whether the field or the variable is being used.

    Noncompliant Code Example

    class Foo {
      public $myField;
    
      public function doSomething() {
        $myField = 0;
        ...
      }
    }
    

    See

    Rename "$operator" which has the same name as the field declared at line 50.
    Open

            $operator = $this->operator;

    Shadowing fields with a local variable is a bad practice that reduces code readability: it makes it confusing to know whether the field or the variable is being used.

    Noncompliant Code Example

    class Foo {
      public $myField;
    
      public function doSomething() {
        $myField = 0;
        ...
      }
    }
    

    See

    Rename "$fieldModel" which has the same name as the field declared at line 30.
    Open

                $fieldModel = $this->queryGenerator->getRelatedModuleField($fieldName, $fieldModuleName);

    Shadowing fields with a local variable is a bad practice that reduces code readability: it makes it confusing to know whether the field or the variable is being used.

    Noncompliant Code Example

    class Foo {
      public $myField;
    
      public function doSomething() {
        $myField = 0;
        ...
      }
    }
    

    See

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

                $this->queryGenerator->addTableToQuery($fieldModel->getTableName());
    Severity: Critical
    Found in app/Conditions/QueryFields/BaseField.php by phan

    Saw an @param annotation for value, but it was not found in the param list of function __construct(\App\QueryGenerator $queryGenerator, \Vtiger_Field_Model|false $fieldModel = null)
    Open

         * @param array|string        $value

    Property \App\Conditions\QueryFields\BaseField->queryGenerator has undeclared type \App\QueryGenerator (Did you mean class \Tests\App\QueryGenerator)
    Open

        protected $queryGenerator;

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

            return $this->queryGenerator->getModule();
    Severity: Critical
    Found in app/Conditions/QueryFields/BaseField.php by phan

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

                $fieldModel = $this->queryGenerator->getRelatedModuleField($fieldName, $fieldModuleName);
    Severity: Critical
    Found in app/Conditions/QueryFields/BaseField.php by phan

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

                $this->queryGenerator->addRelatedJoin([
    Severity: Critical
    Found in app/Conditions/QueryFields/BaseField.php by phan

    Default value for \Vtiger_Field_Model $fieldModel can't be false
    Open

        public function __construct(\App\QueryGenerator $queryGenerator, $fieldModel = false)

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

                $fieldModel = $this->queryGenerator->getModuleField($fieldName);
    Severity: Critical
    Found in app/Conditions/QueryFields/BaseField.php by phan

    Assigning null to property but \App\Conditions\QueryFields\BaseField->fullColumnName is string
    Open

            $this->fullColumnName = null;

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

            Log::error("Not found operator: $fn in  " . __CLASS__);
    Severity: Critical
    Found in app/Conditions/QueryFields/BaseField.php by phan

    Parameter $queryGenerator has undeclared type \App\QueryGenerator (Did you mean class \Tests\App\QueryGenerator)
    Open

        public function __construct(\App\QueryGenerator $queryGenerator, $fieldModel = false)

    Assigning null to property but \App\Conditions\QueryFields\BaseField->tableName is string
    Open

            $this->tableName = null;

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

            return [$this->getColumnName() => new \yii\db\Expression($this->getColumnNameFromSource())];
    Severity: Critical
    Found in app/Conditions/QueryFields/BaseField.php by phan

    Saw an @param annotation for operator, but it was not found in the param list of function __construct(\App\QueryGenerator $queryGenerator, \Vtiger_Field_Model|false $fieldModel = null)
    Open

         * @param string              $operator

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

                Log::trace("Entering to $fn in " . __CLASS__);
    Severity: Critical
    Found in app/Conditions/QueryFields/BaseField.php by phan

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

            return ['<>', $this->getColumnName(), new \yii\db\Expression($this->getColumnNameFromSource())];
    Severity: Critical
    Found in app/Conditions/QueryFields/BaseField.php by phan

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

            $fn = 'operator' . ucfirst($operator ?? $this->operator);

    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

         * @var array|string

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

         * @param \App\QueryGenerator $queryGenerator

    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 setOperator(string $operator): void

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

            $this->operator = strtolower($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

        /**

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

         * @var array Related detail

    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

        /**

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

         */

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

         * @var string

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

        public function getModuleName(): string

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

        }

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

         * Set 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

        public function __construct(\App\QueryGenerator $queryGenerator, $fieldModel = false)

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

         * @var string

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

        protected $value;

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

            return $this->queryGenerator->getModule();

    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

         * @var \Vtiger_Field_Model

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

        protected $fieldModel;

    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

         * @param array|string        $value

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

         * @param string              $operator

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

            $this->queryGenerator = $queryGenerator;

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

         * @return string

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

        {

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

        protected $queryGenerator;

    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

            $this->fieldModel = $fieldModel;

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

         * @param \Vtiger_Field_Model $fieldModel

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

         * @var \App\QueryGenerator

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

        protected $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

         * @param string $operator

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

         * @var string

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

         * Constructor.

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

        }

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

        protected $tableName;

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

        {

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

         * Get module name.

    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

        protected $operator;

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

        protected $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

        /**

    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->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

            [$fieldName, $fieldModuleName, $sourceFieldName] = array_pad(explode(':', $this->value), 3, '');

    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

                Log::trace("Entering to $fn in " . __CLASS__);

    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

                    'relatedModule' => $fieldModuleName,

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

                    'relatedField' => $fieldName,

    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

        {

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

         * @param array $relatedInfo

    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

                $fieldModel = $this->queryGenerator->getModuleField($fieldName);

    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

            $table = $this->fieldModel->getTableName();

    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 mixed

    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

         * @return string

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

        public function getColumnNameFromSource(): string

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

                    'sourceField' => $sourceFieldName,

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

         * Get condition.

    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

            $this->related = $relatedInfo;

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

        public function getRelated(): 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

         * Get order by.

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

         * @param mixed $order

    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 string

    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;

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

         * Get column name from source.

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

                $this->queryGenerator->addRelatedJoin([

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

                $this->queryGenerator->addTableToQuery($fieldModel->getTableName());

    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 $fieldModel ? ($fieldModel->getTableName() . $sourceFieldName . '.' . $fieldModel->getColumnName()) : '';

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

         * @param string|null $operator

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

         * Get table name.

    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

         * Set table name.

    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

         * Get value.

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

         * Set related details.

    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 getTableName(): string

    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

            return $this->tableName = $table;

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

         */

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

            $this->tableName = $tableName;

    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->{$fn}();

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

         * Auto operator, it allows you to use formulas: * and _.

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

        public function operatorWca(): array

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

        public function setRelated(array $relatedInfo): void

    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 getCondition(?string $operator = null)

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

         * @return bool|\Vtiger_Field_Model

    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 ($sourceFieldName) {

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

        {

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

            Log::error("Not found operator: $fn in  " . __CLASS__);

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

        public function operatorA(): array

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

         * Wildcard - asterisk.

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

         *  Get additional field model for list view.

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

                return $this->tableName;

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

         * @param string $tableName

    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

         *

    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 getListViewFields()

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

         *

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

         * Get column name.

    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

            }

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

        public function setTableName($tableName): void

    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

        public function getValue()

    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->tableName) {

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

                $table .= $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

        {

    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->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

         * @param mixed $value

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

            return false;

    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 getOrderBy($order = false): 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 ['like', $this->getColumnName(), str_replace('*', '%', "%{$this->getValue()}%"), false];

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

         * Set value.

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

         * @return $this

    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 operatorE(): array

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

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

    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

            $order = $order && \App\Db::DESC === strtoupper($order) ? SORT_DESC : SORT_ASC;

    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

            return $this->fullColumnName = $this->getTableName() . '.' . $this->fieldModel->getColumnName();

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

                $fieldModel = $this->queryGenerator->getRelatedModuleField($fieldName, $fieldModuleName);

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

         * @return array|bool

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

            $fn = 'operator' . ucfirst($operator ?? $this->operator);

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

            if (method_exists($this, $fn)) {

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

            return $this->getCondition($this->getOperator());

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

         * Search for a specified pattern in a column.

    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 setValue($value)

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

            return $this;

    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

         * Starts with operator.

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

            return ['like', $this->getColumnName(), $this->getValue() . '%', false];

    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 $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

         * Get related details.

    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() => $order];

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

         * @return string

    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 false;

    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

            return [(\is_array($value) ? 'not in' : '<>'), $this->getColumnName(), $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

            ];

    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

            $this->fullColumnName = null;

    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

         * Not equal operator.

    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

         * Is not 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

                $operator = 'c';

    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

         * Get field model.

    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->fieldModel;

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

            if ('a' === $this->operator) {

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

                    $operator = 'wca';

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

        public function operatorEw()

    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

         * Does not contain operator.

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

        public function operatorEf(): array

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

            return [$this->getColumnName() => new \yii\db\Expression($this->getColumnNameFromSource())];

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

            $this->value = $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

         */

    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

         * Gets real 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

            return ['like', $this->getColumnName(), $this->getValue()];

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

         */

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

                ['not', [$this->getColumnName() => null]],

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

            return ['not like', $this->getColumnName(), $this->getValue()];

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

         * Is not equal to selected field 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

         * @return array

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

            return ['<>', $this->getColumnName(), new \yii\db\Expression($this->getColumnNameFromSource())];

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

         * @return \Vtiger_Field_Model

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

                if (false !== strpos($this->getValue(), '*')) {

    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

         * Ends with operator.

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

                ['=', $this->getColumnName(), ''],

    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 operatorNf(): 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

        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

         * @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

                }

    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

         * Equals operator.

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

        public function operatorS()

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

        public function operatorK(): 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

         * 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

            return ['like', $this->getColumnName(), '%' . $this->getValue(), false];

    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 getField()

    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

        /**

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

            return ['or',

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

         * Is equal to selected field 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

        public function getOperator(): string

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

        {

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

            $value = $this->getValue();

    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 array

    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

                [$this->getColumnName() => null],

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

        /**

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

         * Invoked when object is cloning.

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

            $this->tableName = null;

    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

         * @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

            $operator = $this->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

         * Is empty operator.

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

            return ['and',

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

                ['<>', $this->getColumnName(), ''],

    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 __clone()

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

         * @return string

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

        }

    There are no issues that match your filters.

    Category
    Status