YetiForceCompany/YetiForceCRM

View on GitHub
modules/Users/models/Field.php

Summary

Maintainability
A
1 hr
Test Coverage
F
18%

Function isEditable has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    public function isEditable(): bool
    {
        if (null === $this->get('editable')) {
            if (115 === $this->get('uitype') && (!\App\User::getCurrentUserModel()->isAdmin() || \App\User::getCurrentUserId() === $this->get('recordId'))) {
                $permission = false;
Severity: Minor
Found in modules/Users/models/Field.php - About 45 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

Method getDisplayValue has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public function getDisplayValue($value, $record = false, $recordModel = false, $rawText = false, $length = false)
Severity: Minor
Found in modules/Users/models/Field.php - About 35 mins to fix

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

        public function getDisplayValue($value, $record = false, $recordModel = false, $rawText = false, $length = false)
    Severity: Minor
    Found in modules/Users/models/Field.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 '71', column '18').
    Open

                $query = (new \App\Db\Query())->select([$this->getName()])->from('vtiger_' . $this->getName());
    Severity: Minor
    Found in modules/Users/models/Field.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 getDisplayValue has a boolean flag argument $rawText, which is a certain sign of a Single Responsibility Principle violation.
    Open

        public function getDisplayValue($value, $record = false, $recordModel = false, $rawText = false, $length = false)
    Severity: Minor
    Found in modules/Users/models/Field.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

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

        public function getDisplayValue($value, $record = false, $recordModel = false, $rawText = false, $length = false)
    Severity: Minor
    Found in modules/Users/models/Field.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

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

        public function getDisplayValue($value, $record = false, $recordModel = false, $rawText = false, $length = false)
    Severity: Minor
    Found in modules/Users/models/Field.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

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

        public function getPicklistValues($skipCheckingRole = false)
    Severity: Minor
    Found in modules/Users/models/Field.php by phpmd

    BooleanArgumentFlag

    Since: 1.4.0

    A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

    Example

    class Foo {
        public function bar($flag = true) {
        }
    }

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

    Avoid using static access to class '\App\User' in method 'isEditable'.
    Open

                if (115 === $this->get('uitype') && (!\App\User::getCurrentUserModel()->isAdmin() || \App\User::getCurrentUserId() === $this->get('recordId'))) {
    Severity: Minor
    Found in modules/Users/models/Field.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\User' in method 'isEditable'.
    Open

                    $permission = $this->get('recordId') === \App\User::getCurrentUserId();
    Severity: Minor
    Found in modules/Users/models/Field.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 'Users_Record_Model' in method 'isReadOnly'.
    Open

            $currentUserModel = Users_Record_Model::getCurrentUserModel();
    Severity: Minor
    Found in modules/Users/models/Field.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\Language' in method 'getDisplayValue'.
    Open

                return \App\Language::translate('LBL_SPACE', 'Users');
    Severity: Minor
    Found in modules/Users/models/Field.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 isAjaxEditable uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
    Open

            } else {
                $permission = parent::isAjaxEditable();
            }
    Severity: Minor
    Found in modules/Users/models/Field.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 'Settings_Roles_Record_Model' in method 'getAllRoles'.
    Open

            $roleModels = Settings_Roles_Record_Model::getAll();
    Severity: Minor
    Found in modules/Users/models/Field.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\Language' in method 'getPicklistValues'.
    Open

                    $fieldPickListValues[$picklistValue] = \App\Language::translate($picklistValue, $this->getModuleName(), false, false);
    Severity: Minor
    Found in modules/Users/models/Field.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 isEditable uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
    Open

                } else {
                    $permission = parent::isEditable();
                }
    Severity: Minor
    Found in modules/Users/models/Field.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\Config' in method 'isViewEnabled'.
    Open

            if (106 === $this->get('uitype') && !App\Config::module('Users', 'USER_NAME_IS_EDITABLE')) {
    Severity: Minor
    Found in modules/Users/models/Field.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 "editable" 3 times.
    Open

            if (null === $this->get('editable')) {
    Severity: Critical
    Found in modules/Users/models/Field.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 "uitype" 5 times.
    Open

            if ((false === $currentUserModel->isAdminUser() && 98 == $this->get('uitype')) || 156 == $this->get('uitype')) {
    Severity: Critical
    Found in modules/Users/models/Field.php by sonar-php

    Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.

    On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

    Noncompliant Code Example

    With the default threshold of 3:

    function run() {
      prepare('action1');                              // Non-Compliant - 'action1' is duplicated 3 times
      execute('action1');
      release('action1');
    }
    

    Compliant Solution

    ACTION_1 = 'action1';
    
    function run() {
      prepare(ACTION_1);
      execute(ACTION_1);
      release(ACTION_1);
    }
    

    Exceptions

    To prevent generating some false-positives, literals having less than 5 characters are excluded.

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

                $query = (new \App\Db\Query())->select([$this->getName()])->from('vtiger_' . $this->getName());
    Severity: Critical
    Found in modules/Users/models/Field.php by phan

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

                if (115 === $this->get('uitype') && (!\App\User::getCurrentUserModel()->isAdmin() || \App\User::getCurrentUserId() === $this->get('recordId'))) {
    Severity: Critical
    Found in modules/Users/models/Field.php by phan

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

            return ('login_method' === $this->getColumnName() && !\App\User::getCurrentUserModel()->isAdmin()) || (10 === (int) $this->get('displaytype'));
    Severity: Critical
    Found in modules/Users/models/Field.php by phan

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

                    $permission = \App\User::getCurrentUserModel()->isAdmin();
    Severity: Critical
    Found in modules/Users/models/Field.php by phan

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

                if (115 === $this->get('uitype') && (!\App\User::getCurrentUserModel()->isAdmin() || \App\User::getCurrentUserId() === $this->get('recordId'))) {
    Severity: Critical
    Found in modules/Users/models/Field.php by phan

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

                    $permission = $this->get('recordId') === \App\User::getCurrentUserId();
    Severity: Critical
    Found in modules/Users/models/Field.php by phan

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

            if (('is_admin' === $this->getName()) && \App\User::getCurrentUserModel()->isAdmin()) {
    Severity: Critical
    Found in modules/Users/models/Field.php by phan

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

                $permission = \App\User::getCurrentUserModel()->isAdmin();
    Severity: Critical
    Found in modules/Users/models/Field.php by phan

    Argument 3 (language) is false but \App\Language::translate() takes null|string defined at /code/app/Language.php:161
    Open

                    $fieldPickListValues[$picklistValue] = \App\Language::translate($picklistValue, $this->getModuleName(), false, false);
    Severity: Minor
    Found in modules/Users/models/Field.php by phan

    Each class must be in a namespace of at least one level (a top-level vendor name)
    Open

    class Users_Field_Model extends Vtiger_Field_Model

    The class Users_Field_Model is not named in CamelCase.
    Open

    class Users_Field_Model extends Vtiger_Field_Model
    {
        /** {@inheritdoc} */
        public function isReadOnly(): bool
        {
    Severity: Minor
    Found in modules/Users/models/Field.php by phpmd

    CamelCaseClassName

    Since: 0.2

    It is considered best practice to use the CamelCase notation to name classes.

    Example

    class class_name {
    }

    Source

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

        }

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

        }

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

                while ($row = $dataReader->read()) {

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

        /** {@inheritdoc} */

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

        /**

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

            $roles = [];

    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

            }

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

        public function isExportable(): bool

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

            if (!$this->isEditable() || \in_array($this->getUIType(), [105, 106, 98, 101]) || \in_array($this->getName(), ['date_format', 'email1'])) {

    Line exceeds 120 characters; contains 147 characters
    Open

            if (!$this->isEditable() || \in_array($this->getUIType(), [105, 106, 98, 101]) || \in_array($this->getName(), ['date_format', 'email1'])) {

    Line exceeds 120 characters; contains 128 characters
    Open

            if (('currency_decimal_separator' === $fieldName || 'currency_grouping_separator' === $fieldName) && (' ' === $value)) {

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

            foreach ($roleModels as $roleId => $roleModel) {

    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

            if (106 === $this->get('uitype') && !App\Config::module('Users', 'USER_NAME_IS_EDITABLE')) {

    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->isViewable() || 99 === $this->getUIType();

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

        {

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

            } elseif ('login_method' === $this->getName()) {

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

        public function getDisplayValue($value, $record = false, $recordModel = false, $rawText = false, $length = 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 getAllRoles()

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

            return $roles;

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

                if (115 === $this->get('uitype') && (!\App\User::getCurrentUserModel()->isAdmin() || \App\User::getCurrentUserId() === $this->get('recordId'))) {

    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 parent::isWritable();

    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 bool

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

            return parent::getPicklistValues($skipCheckingRole);

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

         */

    Line exceeds 120 characters; contains 157 characters
    Open

                if (115 === $this->get('uitype') && (!\App\User::getCurrentUserModel()->isAdmin() || \App\User::getCurrentUserId() === $this->get('recordId'))) {

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

        public function isViewable()

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

            if (('is_admin' === $this->getName()) && \App\User::getCurrentUserModel()->isAdmin()) {

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

        public function isReadOnly(): bool

    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

         * Function to check whether field is ajax editable'.

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

                $permission = \App\User::getCurrentUserModel()->isAdmin();

    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 parent::getDisplayValue($value, $record, $recordModel, $rawText, $length);

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

                $roleName = $roleModel->getName();

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

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

        {

    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

         * Function to check whether this field editable or not.

    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 parent::isReadOnly();

    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

                $permission = parent::isAjaxEditable();

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

                $fieldPickListValues = [];

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

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

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

                    $permission = \App\User::getCurrentUserModel()->isAdmin();

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

         * @return bool

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

                $permission = false;

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

            return $permission;

    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 getPicklistValues($skipCheckingRole = false)

    Line exceeds 120 characters; contains 151 characters
    Open

            return ('login_method' === $this->getColumnName() && !\App\User::getCurrentUserModel()->isAdmin()) || (10 === (int) $this->get('displaytype'));

    Line exceeds 120 characters; contains 134 characters
    Open

                    $fieldPickListValues[$picklistValue] = \App\Language::translate($picklistValue, $this->getModuleName(), false, false);

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

            $fieldName = $this->getName();

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

                return \App\Language::translate('LBL_SPACE', 'Users');

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

         *

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

                } elseif ('super_user' === $this->getName()) {

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

        public function isEditableReadOnly()

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

         * Function to check if the field is shown in detail view.

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

            if (4 === $this->getDisplayType() || \in_array($this->get('presence'), [1, 3])) {

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

                $query = (new \App\Db\Query())->select([$this->getName()])->from('vtiger_' . $this->getName());

    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->set('editable', $permission);

    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 ('login_method' === $this->getColumnName() && !\App\User::getCurrentUserModel()->isAdmin()) || (10 === (int) $this->get('displaytype'));

    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

                $roles[$roleName] = $roleId;

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

        public function isEditable(): bool

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

            return $this->get('editable');

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

            return 'authy_secret_totp' !== $this->getColumnName() && parent::isViewable();

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

        /**

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

        /** {@inheritdoc} */

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

         *

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

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

                $dataReader->close();

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

        /** {@inheritdoc} */

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

        /** {@inheritdoc} */

    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 (115 == $this->get('uitype')) {

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

                return $fieldPickListValues;

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

            return parent::isViewEnabled();

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

        }

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

        /** {@inheritdoc} */

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

         * Function returns all the User Roles.

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

                $dataReader = $query->createCommand()->query();

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

            $roleModels = Settings_Roles_Record_Model::getAll();

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

                    $picklistValue = $row[$this->getName()];

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

                    $fieldPickListValues[$picklistValue] = \App\Language::translate($picklistValue, $this->getModuleName(), false, false);

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

            if (('currency_decimal_separator' === $fieldName || 'currency_grouping_separator' === $fieldName) && (' ' === $value)) {

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

                    $permission = parent::isEditable();

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

            $currentUserModel = Users_Record_Model::getCurrentUserModel();

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

            if (null === $this->get('editable')) {

    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

            if ((false === $currentUserModel->isAdminUser() && 98 == $this->get('uitype')) || 156 == $this->get('uitype')) {

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

         */

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

            }

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

        }

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

         * @return array

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

         * @return bool true/false

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

                } elseif ('authy_secret_totp' === $this->getColumnName()) {

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

        public function isWritable()

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

        {

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

        /** {@inheritdoc} */

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

                return true;

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

                    $permission = $this->get('recordId') === \App\User::getCurrentUserId();

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

        /** {@inheritdoc} */

    Class name "Users_Field_Model" is not in camel caps format
    Open

    class Users_Field_Model extends Vtiger_Field_Model

    There are no issues that match your filters.

    Category
    Status