YetiForceCompany/YetiForceCRM

View on GitHub
app/Cli/Users.php

Summary

Maintainability
C
1 day
Test Coverage
F
29%

Method resetPassword has 71 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function resetPassword(): void
    {
        $this->climate->arguments->add([
            'login' => [
                'prefix' => 'l',
Severity: Major
Found in app/Cli/Users.php - About 2 hrs to fix

    Method resetAllPasswords has 44 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function resetAllPasswords(): void
        {
            $this->climate->arguments->add([
                'confirmation' => [
                    'prefix' => 'c',
    Severity: Minor
    Found in app/Cli/Users.php - About 1 hr to fix

      Function resetPassword has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
      Open

          public function resetPassword(): void
          {
              $this->climate->arguments->add([
                  'login' => [
                      'prefix' => 'l',
      Severity: Minor
      Found in app/Cli/Users.php - About 1 hr to fix

      Cognitive Complexity

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

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

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

      Further reading

      Method passwordAuth has 38 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function passwordAuth(): void
          {
              $this->climate->arguments->add([
                  'login' => [
                      'prefix' => 'l',
      Severity: Minor
      Found in app/Cli/Users.php - About 1 hr to fix

        Function passwordAuth has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
        Open

            public function passwordAuth(): void
            {
                $this->climate->arguments->add([
                    'login' => [
                        'prefix' => 'l',
        Severity: Minor
        Found in app/Cli/Users.php - About 55 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 method resetPassword() has an NPath complexity of 384. The configured NPath complexity threshold is 200.
        Open

            public function resetPassword(): void
            {
                $this->climate->arguments->add([
                    'login' => [
                        'prefix' => 'l',
        Severity: Minor
        Found in app/Cli/Users.php by phpmd

        NPathComplexity

        Since: 0.1

        The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

        Example

        class Foo {
            function bar() {
                // lots of complicated code
            }
        }

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

        The method resetPassword() has a Cyclomatic Complexity of 11. The configured cyclomatic complexity threshold is 10.
        Open

            public function resetPassword(): void
            {
                $this->climate->arguments->add([
                    'login' => [
                        'prefix' => 'l',
        Severity: Minor
        Found in app/Cli/Users.php by phpmd

        CyclomaticComplexity

        Since: 0.1

        Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

        Example

        // Cyclomatic Complexity = 11
        class Foo {
        1   public function example() {
        2       if ($a == $b) {
        3           if ($a1 == $b1) {
                        fiddle();
        4           } elseif ($a2 == $b2) {
                        fiddle();
                    } else {
                        fiddle();
                    }
        5       } elseif ($c == $d) {
        6           while ($c == $d) {
                        fiddle();
                    }
        7        } elseif ($e == $f) {
        8           for ($n = 0; $n < $h; $n++) {
                        fiddle();
                    }
                } else {
                    switch ($z) {
        9               case 1:
                            fiddle();
                            break;
        10              case 2:
                            fiddle();
                            break;
        11              case 3:
                            fiddle();
                            break;
                        default:
                            fiddle();
                            break;
                    }
                }
            }
        }

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

        Missing class import via use statement (line '60', column '15').
        Open

                $row = (new \App\Db\Query())->select(['id', 'deleted'])->from('vtiger_users')->where(['or', ['user_name' => $userName], ['user_name' => strtolower($userName)]])->limit(1)->one();
        Severity: Minor
        Found in app/Cli/Users.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 '140', column '24').
        Open

                    $eventHandler = new \App\EventHandler();
        Severity: Minor
        Found in app/Cli/Users.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 '131', column '19').
        Open

                $userIds = (new \App\Db\Query())->select(['id'])->from('vtiger_users')->where(['deleted' => 0])->column();
        Severity: Minor
        Found in app/Cli/Users.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 '188', column '15').
        Open

                $row = (new \App\Db\Query())->select(['id', 'deleted'])->from('vtiger_users')->where(['or', ['user_name' => $userName], ['user_name' => strtolower($userName)]])->limit(1)->one();
        Severity: Minor
        Found in app/Cli/Users.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 '85', column '23').
        Open

                $eventHandler = new \App\EventHandler();
        Severity: Minor
        Found in app/Cli/Users.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 resetPassword uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
        Open

                } else {
                    $password = \App\Encryption::generateUserPassword();
                    $this->climate->lightGreen('New password: ' . $password);
                }
        Severity: Minor
        Found in app/Cli/Users.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\Fields\DateTime' in method 'resetAllPasswords'.
        Open

                        'expirationDate' => \App\Fields\DateTime::formatToDisplay($expirationDate),
        Severity: Minor
        Found in app/Cli/Users.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 resetPassword uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
        Open

                    } else {
                        $this->cli->actionsList('Users');
                    }
        Severity: Minor
        Found in app/Cli/Users.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\Encryption' in method 'resetAllPasswords'.
        Open

                    $userRecordModel->set('user_password', \App\Encryption::generateUserPassword());
        Severity: Minor
        Found in app/Cli/Users.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 resetPassword uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
        Open

                } else {
                    $input = $this->climate->input('Enter login/username:');
                    $userName = $input->prompt();
                }
        Severity: Minor
        Found in app/Cli/Users.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 '\Users_Record_Model' in method 'resetPassword'.
        Open

                $userRecordModel = \Users_Record_Model::getInstanceById($row['id'], 'Users');
        Severity: Minor
        Found in app/Cli/Users.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\Encryption' in method 'resetPassword'.
        Open

                    $password = \App\Encryption::generateUserPassword();
        Severity: Minor
        Found in app/Cli/Users.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\Fields\DateTime' in method 'resetPassword'.
        Open

                        'expirationDate' => \App\Fields\DateTime::formatToDisplay($expirationDate),
        Severity: Minor
        Found in app/Cli/Users.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 'passwordAuth'.
        Open

                $userRecordModel = \Users_Record_Model::getInstanceById($row['id'], 'Users');
        Severity: Minor
        Found in app/Cli/Users.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\Utils\Tokens' in method 'resetPassword'.
        Open

                    $token = \App\Utils\Tokens::generate('Users_LoginForgotPassword_Action', [$userRecordModel->getId()], $expirationDate);
        Severity: Minor
        Found in app/Cli/Users.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\Mailer' in method 'resetPassword'.
        Open

                    \App\Mailer::sendFromTemplate([
                        'template' => 'UsersResetPassword',
                        'moduleName' => 'Users',
                        'recordId' => $userRecordModel->getId(),
                        'to' => $userRecordModel->get('email1'),
        Severity: Minor
        Found in app/Cli/Users.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 passwordAuth uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
        Open

                } else {
                    $input = $this->climate->input('Enter login/username:');
                    $userName = $input->prompt();
                }
        Severity: Minor
        Found in app/Cli/Users.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 '\Users_Record_Model' in method 'resetAllPasswords'.
        Open

                    $userRecordModel = \Users_Record_Model::getInstanceById($userId, 'Users');
        Severity: Minor
        Found in app/Cli/Users.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 passwordAuth uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
        Open

                    } else {
                        $this->cli->actionsList('Users');
                    }
        Severity: Minor
        Found in app/Cli/Users.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\Utils\Tokens' in method 'resetAllPasswords'.
        Open

                    $token = \App\Utils\Tokens::generate('Users_LoginForgotPassword_Action', [$userRecordModel->getId()], $expirationDate);
        Severity: Minor
        Found in app/Cli/Users.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\Mailer' in method 'resetAllPasswords'.
        Open

                    \App\Mailer::sendFromTemplate([
                        'template' => 'UsersResetPassword',
                        'moduleName' => 'Users',
                        'recordId' => $userRecordModel->getId(),
                        'to' => $userRecordModel->get('email1'),
        Severity: Minor
        Found in app/Cli/Users.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 "user_name" 4 times.
        Open

                $row = (new \App\Db\Query())->select(['id', 'deleted'])->from('vtiger_users')->where(['or', ['user_name' => $userName], ['user_name' => strtolower($userName)]])->limit(1)->one();
        Severity: Critical
        Found in app/Cli/Users.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 "confirmation" 5 times.
        Open

                    'confirmation' => [
        Severity: Critical
        Found in app/Cli/Users.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 "deleted" 5 times.
        Open

                $row = (new \App\Db\Query())->select(['id', 'deleted'])->from('vtiger_users')->where(['or', ['user_name' => $userName], ['user_name' => strtolower($userName)]])->limit(1)->one();
        Severity: Critical
        Found in app/Cli/Users.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 "vtiger_users" 3 times.
        Open

                $row = (new \App\Db\Query())->select(['id', 'deleted'])->from('vtiger_users')->where(['or', ['user_name' => $userName], ['user_name' => strtolower($userName)]])->limit(1)->one();
        Severity: Critical
        Found in app/Cli/Users.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 "password" 3 times.
        Open

                    'password' => [
        Severity: Critical
        Found in app/Cli/Users.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 "prefix" 5 times.
        Open

                        'prefix' => 'l',
        Severity: Critical
        Found in app/Cli/Users.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 "login" 6 times.
        Open

                    'login' => [
        Severity: Critical
        Found in app/Cli/Users.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 "action" 4 times.
        Open

                $eventHandler->setParams(['action' => 'reset']);
        Severity: Critical
        Found in app/Cli/Users.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 "Users" 13 times.
        Open

            public $moduleName = 'Users';
        Severity: Critical
        Found in app/Cli/Users.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 "description" 5 times.
        Open

                        'description' => 'Login/User name',
        Severity: Critical
        Found in app/Cli/Users.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 "Y-m-d H:i:s" 4 times.
        Open

                $userRecordModel->set('date_password_change', date('Y-m-d H:i:s'));
        Severity: Critical
        Found in app/Cli/Users.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 method confirm from undeclared class \League\CLImate\CLImate
        Open

                    if ($this->climate->arguments->defined('confirmation') || $this->climate->confirm('Re-enter login?')->confirmed()) {
        Severity: Critical
        Found in app/Cli/Users.php by phan

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

                $row = (new \App\Db\Query())->select(['id', 'deleted'])->from('vtiger_users')->where(['or', ['user_name' => $userName], ['user_name' => strtolower($userName)]])->limit(1)->one();
        Severity: Critical
        Found in app/Cli/Users.php by phan

        Call to method input from undeclared class \League\CLImate\CLImate
        Open

                    $input = $this->climate->input('Enter login/username:');
        Severity: Critical
        Found in app/Cli/Users.php by phan

        Reference to instance property arguments from undeclared class \League\CLImate\CLImate
        Open

                if (!$this->climate->arguments->defined('action')) {
        Severity: Minor
        Found in app/Cli/Users.php by phan

        Call to method confirm from undeclared class \League\CLImate\CLImate
        Open

                if (!$this->climate->arguments->defined('confirmation') && !$this->climate->confirm('Do you want to reset the passwords of all active users?')->confirmed()) {
        Severity: Critical
        Found in app/Cli/Users.php by phan

        Call to method input from undeclared class \League\CLImate\CLImate
        Open

                    $input = $this->climate->input('Enter login/username:');
        Severity: Critical
        Found in app/Cli/Users.php by phan

        Reference to instance property arguments from undeclared class \League\CLImate\CLImate
        Open

                    $password = $this->climate->arguments->get('password');
        Severity: Minor
        Found in app/Cli/Users.php by phan

        Call to method confirm from undeclared class \League\CLImate\CLImate
        Open

                if ($this->climate->arguments->defined('confirmation') || $this->climate->confirm('Send password reset link to user\'s email address?')->confirmed()) {
        Severity: Critical
        Found in app/Cli/Users.php by phan

        Call to method lightGreen from undeclared class \League\CLImate\CLImate
        Open

                    $this->climate->lightGreen('User inactive!!!');
        Severity: Critical
        Found in app/Cli/Users.php by phan

        Call to method red from undeclared class \League\CLImate\CLImate
        Open

                    $this->climate->red('User not found');
        Severity: Critical
        Found in app/Cli/Users.php by phan

        Call to method generateUserPassword from undeclared class \App\Encryption (Did you mean class \Tests\App\Encryption)
        Open

                    $password = \App\Encryption::generateUserPassword();
        Severity: Critical
        Found in app/Cli/Users.php by phan

        Reference to static property site_URL from undeclared class \Config\Main
        Open

                        'url' => \Config\Main::$site_URL . 'index.php?module=Users&view=LoginPassChange&token=' . $token,
        Severity: Critical
        Found in app/Cli/Users.php by phan

        Call to method generateUserPassword from undeclared class \App\Encryption (Did you mean class \Tests\App\Encryption)
        Open

                    $userRecordModel->set('user_password', \App\Encryption::generateUserPassword());
        Severity: Critical
        Found in app/Cli/Users.php by phan

        Argument 2 (value) is true but \Users_Record_Model::set() takes string defined at /code/modules/Users/models/Record.php:52
        Open

                $userRecordModel->set('changeUserPassword', true);
        Severity: Minor
        Found in app/Cli/Users.php by phan

        Call to method lightGreen from undeclared class \League\CLImate\CLImate
        Open

                    $this->climate->lightGreen('New password: ' . $password);
        Severity: Critical
        Found in app/Cli/Users.php by phan

        Reference to instance property arguments from undeclared class \League\CLImate\CLImate
        Open

                if ($this->climate->arguments->defined('login')) {
        Severity: Minor
        Found in app/Cli/Users.php by phan

        Reference to instance property arguments from undeclared class \League\CLImate\CLImate
        Open

                    if ($this->climate->arguments->defined('confirmation') || $this->climate->confirm('Re-enter login?')->confirmed()) {
        Severity: Minor
        Found in app/Cli/Users.php by phan

        Reference to instance property arguments from undeclared class \League\CLImate\CLImate
        Open

                if ($this->climate->arguments->defined('confirmation') || $this->climate->confirm('Send password reset link to user\'s email address?')->confirmed()) {
        Severity: Minor
        Found in app/Cli/Users.php by phan

        Reference to instance property arguments from undeclared class \League\CLImate\CLImate
        Open

                $this->climate->arguments->add([
        Severity: Minor
        Found in app/Cli/Users.php by phan

        Reference to static property site_URL from undeclared class \Config\Main
        Open

                        'url' => \Config\Main::$site_URL . 'index.php?module=Users&view=LoginPassChange&token=' . $token,
        Severity: Critical
        Found in app/Cli/Users.php by phan

        Reference to instance property arguments from undeclared class \League\CLImate\CLImate
        Open

                if (!$this->climate->arguments->defined('action')) {
        Severity: Minor
        Found in app/Cli/Users.php by phan

        Reference to instance property arguments from undeclared class \League\CLImate\CLImate
        Open

                    $userName = $this->climate->arguments->get('login');
        Severity: Minor
        Found in app/Cli/Users.php by phan

        Call to method progress from undeclared class \League\CLImate\CLImate
        Open

                $progress = $this->climate->progress()->total(\count($userIds));
        Severity: Critical
        Found in app/Cli/Users.php by phan

        Call to method red from undeclared class \League\CLImate\CLImate
        Open

                    $this->climate->red('User not found');
        Severity: Critical
        Found in app/Cli/Users.php by phan

        Reference to instance property arguments from undeclared class \League\CLImate\CLImate
        Open

                if ($this->climate->arguments->defined('password')) {
        Severity: Minor
        Found in app/Cli/Users.php by phan

        Reference to instance property arguments from undeclared class \League\CLImate\CLImate
        Open

                if (!$this->climate->arguments->defined('confirmation') && !$this->climate->confirm('Do you want to reset the passwords of all active users?')->confirmed()) {
        Severity: Minor
        Found in app/Cli/Users.php by phan

        Reference to instance property arguments from undeclared class \League\CLImate\CLImate
        Open

                $this->climate->arguments->parse();
        Severity: Minor
        Found in app/Cli/Users.php by phan

        Reference to instance property arguments from undeclared class \League\CLImate\CLImate
        Open

                if ($this->climate->arguments->defined('login')) {
        Severity: Minor
        Found in app/Cli/Users.php by phan

        Call to method lightGreen from undeclared class \League\CLImate\CLImate
        Open

                $this->climate->lightGreen('Number of passwords reset: ' . $i);
        Severity: Critical
        Found in app/Cli/Users.php by phan

        Call to method confirm from undeclared class \League\CLImate\CLImate
        Open

                    if ($this->climate->confirm('Re-enter login?')->confirmed()) {
        Severity: Critical
        Found in app/Cli/Users.php by phan

        Call to method lightGreen from undeclared class \League\CLImate\CLImate
        Open

                    $this->climate->lightGreen('User inactive!!!');
        Severity: Critical
        Found in app/Cli/Users.php by phan

        Reference to instance property arguments from undeclared class \League\CLImate\CLImate
        Open

                $this->climate->arguments->add([
        Severity: Minor
        Found in app/Cli/Users.php by phan

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

                $row = (new \App\Db\Query())->select(['id', 'deleted'])->from('vtiger_users')->where(['or', ['user_name' => $userName], ['user_name' => strtolower($userName)]])->limit(1)->one();
        Severity: Critical
        Found in app/Cli/Users.php by phan

        Call to method lightBlue from undeclared class \League\CLImate\CLImate
        Open

                $this->climate->lightBlue($userRecordModel->getDisplayName() . ' (' . $userRecordModel->getDisplayValue('roleid', false, true) . ')');
        Severity: Critical
        Found in app/Cli/Users.php by phan

        Call to method lightBlue from undeclared class \League\CLImate\CLImate
        Open

                $this->climate->lightBlue('New passwords will be sent to the user\'s e-mail, it is required that the e-mail sending works properly.');
        Severity: Critical
        Found in app/Cli/Users.php by phan

        Argument 2 (value) is true but \Users_Record_Model::set() takes string defined at /code/modules/Users/models/Record.php:52
        Open

                    $userRecordModel->set('changeUserPassword', true);
        Severity: Minor
        Found in app/Cli/Users.php by phan

        Reference to instance property arguments from undeclared class \League\CLImate\CLImate
        Open

                    $userName = $this->climate->arguments->get('login');
        Severity: Minor
        Found in app/Cli/Users.php by phan

        Reference to instance property arguments from undeclared class \League\CLImate\CLImate
        Open

                $this->climate->arguments->add([
        Severity: Minor
        Found in app/Cli/Users.php by phan

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

                $userIds = (new \App\Db\Query())->select(['id'])->from('vtiger_users')->where(['deleted' => 0])->column();
        Severity: Critical
        Found in app/Cli/Users.php by phan

        Reference to instance property arguments from undeclared class \League\CLImate\CLImate
        Open

                $this->climate->arguments->parse();
        Severity: Minor
        Found in app/Cli/Users.php by phan

        Call to method lightBlue from undeclared class \League\CLImate\CLImate
        Open

                $this->climate->lightBlue($userRecordModel->getDisplayName() . ' (' . $userRecordModel->getDisplayValue('roleid', false, true) . ')');
        Severity: Critical
        Found in app/Cli/Users.php by phan

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

                $i = 0;
        Severity: Minor
        Found in app/Cli/Users.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 $methods = [
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

            public $moduleName = 'Users';
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

            /** {@inheritdoc} */
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                'passwordAuth' => 'Disable 2FA or LDAP auth',
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

            /** @var string[] Methods list */
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                'resetPassword' => 'Reset user password',
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                'resetAllPasswords' => 'Reset all user passwords',
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                $this->climate->arguments->add([
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                if ($this->climate->arguments->defined('login')) {
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                }
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                $row = (new \App\Db\Query())->select(['id', 'deleted'])->from('vtiger_users')->where(['or', ['user_name' => $userName], ['user_name' => strtolower($userName)]])->limit(1)->one();
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                        $this->resetPassword();
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    return;
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                $eventHandler->trigger('UsersAfterPasswordChange');
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                if ($this->climate->arguments->defined('confirmation') || $this->climate->confirm('Send password reset link to user\'s email address?')->confirmed()) {
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    $token = \App\Utils\Tokens::generate('Users_LoginForgotPassword_Action', [$userRecordModel->getId()], $expirationDate);
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                        'recordId' => $userRecordModel->getId(),
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                }
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                }
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                $progress = $this->climate->progress()->total(\count($userIds));
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                $this->climate->lightGreen('Number of passwords reset: ' . $i);
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                        'prefix' => 'c',
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                        'description' => 'Don\'t ask for confirmation',
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    $this->climate->red('User not found');
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    \App\Mailer::sendFromTemplate([
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                        'token' => $token,
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

             * @return void
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                        'token' => $token,
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                $this->climate->arguments->add([
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                        'prefix' => 'l',
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                        'description' => 'New password',
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

        Line exceeds 120 characters; contains 128 characters
        Open

                    if ($this->climate->arguments->defined('confirmation') || $this->climate->confirm('Re-enter login?')->confirmed()) {
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                $userRecordModel->set('changeUserPassword', true);
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

        Line exceeds 120 characters; contains 131 characters
        Open

                    $token = \App\Utils\Tokens::generate('Users_LoginForgotPassword_Action', [$userRecordModel->getId()], $expirationDate);
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                foreach ($userIds as $userId) {
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    ]);
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

            ];
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                ]);
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    }
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                $eventHandler->setParams(['action' => 'reset']);
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                        'to' => $userRecordModel->get('email1'),
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    ],
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                ]);
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                }
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    $userRecordModel->set('user_password', \App\Encryption::generateUserPassword());
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    $userRecordModel->save();
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

             * @return void
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                if (0 !== (int) $row['deleted']) {
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    $this->climate->lightGreen('New password: ' . $password);
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                        'url' => \Config\Main::$site_URL . 'index.php?module=Users&view=LoginPassChange&token=' . $token,
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                $this->climate->lightBlue('New passwords will be sent to the user\'s e-mail, it is required that the e-mail sending works properly.');
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                $i = 0;
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    $eventHandler->setRecordModel($userRecordModel);
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                        'moduleName' => 'Users',
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    $progress->advance();
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    $userName = $this->climate->arguments->get('login');
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    $userName = $input->prompt();
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    } else {
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                $eventHandler->setModuleName('Users');
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

        Line exceeds 120 characters; contains 159 characters
        Open

                if ($this->climate->arguments->defined('confirmation') || $this->climate->confirm('Send password reset link to user\'s email address?')->confirmed()) {
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

            public function passwordAuth(): void
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

            public function resetPassword(): void
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                if (!$row) {
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    $this->climate->lightGreen('User inactive!!!');
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    $expirationDate = date('Y-m-d H:i:s', strtotime('+24 hour'));
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                        'prefix' => 'c',
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                $userIds = (new \App\Db\Query())->select(['id'])->from('vtiger_users')->where(['deleted' => 0])->column();
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    $eventHandler->trigger('UsersBeforePasswordChange');
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                        'to' => $userRecordModel->get('email1'),
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                }
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                        'description' => 'Login/User name',
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                $this->climate->arguments->parse();
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                }
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                }
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

        Line exceeds 120 characters; contains 186 characters
        Open

                $row = (new \App\Db\Query())->select(['id', 'deleted'])->from('vtiger_users')->where(['or', ['user_name' => $userName], ['user_name' => strtolower($userName)]])->limit(1)->one();
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                        $this->cli->actionsList('Users');
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                        'template' => 'UsersResetPassword',
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                if ($this->helpMode) {
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                if (!$this->climate->arguments->defined('confirmation') && !$this->climate->confirm('Do you want to reset the passwords of all active users?')->confirmed()) {
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                        'expirationDate' => \App\Fields\DateTime::formatToDisplay($expirationDate),
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    'login' => [
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                        'prefix' => 'l',
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                        $this->passwordAuth();
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    $this->cli->actionsList('Users');
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                $eventHandler->trigger('UsersBeforePasswordChange');
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                $userRecordModel->save();
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    ]);
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                $this->climate->arguments->add([
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    return;
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    $eventHandler->setParams(['action' => 'massReset']);
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

        Line exceeds 120 characters; contains 131 characters
        Open

                    $token = \App\Utils\Tokens::generate('Users_LoginForgotPassword_Action', [$userRecordModel->getId()], $expirationDate);
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    ++$i;
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

            {
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    } else {
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                $this->climate->lightBlue($userRecordModel->getDisplayName() . ' (' . $userRecordModel->getDisplayValue('roleid', false, true) . ')');
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

             * Reset user password.
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    return;
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                $eventHandler = new \App\EventHandler();
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

        Line exceeds 120 characters; contains 166 characters
        Open

                if (!$this->climate->arguments->defined('confirmation') && !$this->climate->confirm('Do you want to reset the passwords of all active users?')->confirmed()) {
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    $expirationDate = date('Y-m-d H:i:s', strtotime('+24 hour'));
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                        'url' => \Config\Main::$site_URL . 'index.php?module=Users&view=LoginPassChange&token=' . $token,
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                if ($this->climate->arguments->defined('login')) {
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    $userName = $input->prompt();
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                $this->climate->lightBlue($userRecordModel->getDisplayName() . ' (' . $userRecordModel->getDisplayValue('roleid', false, true) . ')');
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                if ($this->climate->arguments->defined('password')) {
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                $userRecordModel->set('user_password', $password);
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                if (!$this->climate->arguments->defined('action')) {
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    return;
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                }
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    $userRecordModel->set('changeUserPassword', true);
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    'login' => [
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                }
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                        'prefix' => 'p',
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                }
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                $userRecordModel = \Users_Record_Model::getInstanceById($row['id'], 'Users');
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                        'moduleName' => 'Users',
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                if (0 !== (int) $row['deleted']) {
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                        'template' => 'UsersResetPassword',
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                        $this->cli->actionsList('Users');
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    ],
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                ]);
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                } else {
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                if (!$row) {
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

        Line exceeds 120 characters; contains 142 characters
        Open

                $this->climate->lightBlue($userRecordModel->getDisplayName() . ' (' . $userRecordModel->getDisplayValue('roleid', false, true) . ')');
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                $userRecordModel->set('authy_secret_totp', '');
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

             * @return void
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    'password' => [
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                }
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    if ($this->climate->arguments->defined('confirmation') || $this->climate->confirm('Re-enter login?')->confirmed()) {
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                $userRecordModel = \Users_Record_Model::getInstanceById($row['id'], 'Users');
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                $eventHandler->setRecordModel($userRecordModel);
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    $this->cli->actionsList('Users');
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

             * Reset all user passwords.
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    'confirmation' => [
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                        'description' => 'Don\'t ask for confirmation',
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    $eventHandler->setModuleName('Users');
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    $token = \App\Utils\Tokens::generate('Users_LoginForgotPassword_Action', [$userRecordModel->getId()], $expirationDate);
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                        'recordId' => $userRecordModel->getId(),
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

            /**
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

             * Disable 2FA or LDAP auth of any user.
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                $row = (new \App\Db\Query())->select(['id', 'deleted'])->from('vtiger_users')->where(['or', ['user_name' => $userName], ['user_name' => strtolower($userName)]])->limit(1)->one();
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                if (!$this->climate->arguments->defined('action')) {
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    ],
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    'confirmation' => [
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                if ($this->helpMode) {
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                $this->climate->arguments->parse();
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                } else {
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                }
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

        Line exceeds 120 characters; contains 142 characters
        Open

                $this->climate->lightBlue($userRecordModel->getDisplayName() . ' (' . $userRecordModel->getDisplayValue('roleid', false, true) . ')');
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    $password = \App\Encryption::generateUserPassword();
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

            }
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

            public function resetAllPasswords(): void
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    $eventHandler->trigger('UsersAfterPasswordChange');
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    \App\Mailer::sendFromTemplate([
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

             */
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                $userRecordModel->save();
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    ],
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    $input = $this->climate->input('Enter login/username:');
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    $password = $this->climate->arguments->get('password');
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                } else {
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                }
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                        'expirationDate' => \App\Fields\DateTime::formatToDisplay($expirationDate),
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

        Line exceeds 120 characters; contains 142 characters
        Open

                $this->climate->lightBlue('New passwords will be sent to the user\'s e-mail, it is required that the e-mail sending works properly.');
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    $userRecordModel = \Users_Record_Model::getInstanceById($userId, 'Users');
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    $userRecordModel->set('date_password_change', date('Y-m-d H:i:s'));
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                }
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                        'description' => 'Login/User name',
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    ],
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                $userRecordModel->set('date_password_change', date('Y-m-d H:i:s'));
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    $this->cli->actionsList('Users');
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    $eventHandler = new \App\EventHandler();
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

             *
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    return;
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    return;
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                if ($this->helpMode) {
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                }
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    if ($this->climate->confirm('Re-enter login?')->confirmed()) {
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                $userRecordModel->set('login_method', 'PLL_PASSWORD');
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    $input = $this->climate->input('Enter login/username:');
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    $this->climate->red('User not found');
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    $this->climate->lightGreen('User inactive!!!');
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

        Line exceeds 120 characters; contains 186 characters
        Open

                $row = (new \App\Db\Query())->select(['id', 'deleted'])->from('vtiger_users')->where(['or', ['user_name' => $userName], ['user_name' => strtolower($userName)]])->limit(1)->one();
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    }
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                    $userName = $this->climate->arguments->get('login');
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

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

                $userRecordModel->set('authy_methods', '');
        Severity: Minor
        Found in app/Cli/Users.php by phpcodesniffer

        There are no issues that match your filters.

        Category
        Status