YetiForceCompany/YetiForceCRM

View on GitHub
tests/Base/A_User.php

Summary

Maintainability
A
0 mins
Test Coverage
A
100%

Missing class import via use statement (line '106', column '26').
Open

        $this->assertSame((new \App\Db\Query())->select(['roleid'])->from('vtiger_user2role')->where(['userid' => self::$id])->scalar(), 'H2');
Severity: Minor
Found in tests/Base/A_User.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 '128', column '26').
Open

        $this->assertSame((new \App\Db\Query())->select(['roleid'])->from('vtiger_user2role')->where(['userid' => self::$id])->scalar(), 'H1');
Severity: Minor
Found in tests/Base/A_User.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 '100', column '15').
Open

        $row = (new \App\Db\Query())->from('vtiger_users')->where(['id' => self::$id])->one();
Severity: Minor
Found in tests/Base/A_User.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 '139', column '27').
Open

        $this->assertFalse((new \App\Db\Query())->from('vtiger_users')->where(['id' => self::$id])->exists(), 'The record was not removed from the database ID: ' . self::$id);
Severity: Minor
Found in tests/Base/A_User.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 '122', column '15').
Open

        $row = (new \App\Db\Query())->from('vtiger_users')->where(['id' => self::$id])->one();
Severity: Minor
Found in tests/Base/A_User.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

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

        if (($userId = \App\User::getUserIdByName($login))) {
Severity: Minor
Found in tests/Base/A_User.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 '\Vtiger_Record_Model' in method 'createUsersRecord'.
Open

        $user = \Vtiger_Record_Model::getCleanInstance('Users');
Severity: Minor
Found in tests/Base/A_User.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 '\Vtiger_Record_Model' in method 'testAddUser'.
Open

        $user = \Vtiger_Record_Model::getCleanInstance('Users');
Severity: Minor
Found in tests/Base/A_User.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 assigning values to variables in if clauses and the like (line '52', column '8').
Open

    public static function createUsersRecord($login = 'demo')
    {
        if (isset(self::$record[$login])) {
            return self::$record[$login];
        }
Severity: Minor
Found in tests/Base/A_User.php by phpmd

IfStatementAssignment

Since: 2.7.0

Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

Example

class Foo
{
    public function bar($flag)
    {
        if ($foo = 'bar') { // possible typo
            // ...
        }
        if ($baz = 0) { // always false
            // ...
        }
    }
}

Source http://phpmd.org/rules/cleancode.html#ifstatementassignment

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

        \App\User::setCurrentUserId(self::createUsersRecord()->getId());
Severity: Minor
Found in tests/Base/A_User.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 '\Settings_Users_Module_Model' in method 'testLocksUser'.
Open

        $moduleModel = \Settings_Users_Module_Model::getInstance();
Severity: Minor
Found in tests/Base/A_User.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 'testDeleteUser'.
Open

        $currentUserModel = \Users_Record_Model::getCurrentUserModel();
Severity: Minor
Found in tests/Base/A_User.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 '\Settings_Users_Module_Model' in method 'testDeleteLocksUser'.
Open

        $moduleModel = \Settings_Users_Module_Model::getInstance();
Severity: Minor
Found in tests/Base/A_User.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 '\Vtiger_Record_Model' in method 'createUsersRecord'.
Open

            self::$record[$login] = \Vtiger_Record_Model::getInstanceById($userId, 'Users');
Severity: Minor
Found in tests/Base/A_User.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

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

Avoid using static access to class '\App\Db' in method 'testLoadBaseUser'.
Open

        $db = \App\Db::getInstance();
Severity: Minor
Found in tests/Base/A_User.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 '\Vtiger_Record_Model' in method 'testEditUser'.
Open

        $user = \Vtiger_Record_Model::getInstanceById(self::$id, 'Users');
Severity: Minor
Found in tests/Base/A_User.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 'testDeleteUser'.
Open

        \Users_Record_Model::deleteUserPermanently(self::$id, $currentUserModel->getId());
Severity: Minor
Found in tests/Base/A_User.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 "false" 4 times.
Open

        $db->createCommand()->update('vtiger_password', ['val' => 'false'], ['type' => 'big_letters'])->execute();
Severity: Critical
Found in tests/Base/A_User.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 "first_name" 5 times.
Open

        $user->set('first_name', 'Demo');
Severity: Critical
Found in tests/Base/A_User.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 "testuser" 4 times.
Open

        $user->set('user_name', 'testuser');
Severity: Critical
Found in tests/Base/A_User.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 "roleid" 5 times.
Open

        $user->set('roleid', 'H2');
Severity: Critical
Found in tests/Base/A_User.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_password" 5 times.
Open

        $db->createCommand()->update('vtiger_password', ['val' => 4], ['type' => 'min_length'])->execute();
Severity: Critical
Found in tests/Base/A_User.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 "YetiForce" 3 times.
Open

        $user->set('last_name', 'YetiForce');
Severity: Critical
Found in tests/Base/A_User.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 "last_name" 5 times.
Open

        $user->set('last_name', 'YetiForce');
Severity: Critical
Found in tests/Base/A_User.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())->from('vtiger_users')->where(['id' => self::$id])->one();
Severity: Critical
Found in tests/Base/A_User.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" 4 times.
Open

            self::$record[$login] = \Vtiger_Record_Model::getInstanceById($userId, 'Users');
Severity: Critical
Found in tests/Base/A_User.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 "email1" 5 times.
Open

        $user->set('email1', "{$login}@yetiforce.com");
Severity: Critical
Found in tests/Base/A_User.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 "user_name" 5 times.
Open

        $user->set('user_name', $login);
Severity: Critical
Found in tests/Base/A_User.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 \Tests\Base\A_User::assertNotFalse
Open

        $this->assertNotFalse($user, 'No user');
Severity: Critical
Found in tests/Base/A_User.php by phan

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

        \App\User::setCurrentUserId(self::createUsersRecord()->getId());
Severity: Critical
Found in tests/Base/A_User.php by phan

Call to undeclared method \Tests\Base\A_User::assertNotFalse
Open

        $this->assertNotFalse($row, 'No record id: ' . self::$id);
Severity: Critical
Found in tests/Base/A_User.php by phan

Call to undeclared method \Tests\Base\A_User::assertNotFalse
Open

        $this->assertNotFalse($row, 'No record id: ' . self::$id);
Severity: Critical
Found in tests/Base/A_User.php by phan

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

        $row = (new \App\Db\Query())->from('vtiger_users')->where(['id' => self::$id])->one();
Severity: Critical
Found in tests/Base/A_User.php by phan

Call to undeclared method \Tests\Base\A_User::assertSame
Open

        $this->assertSame($row['last_name'], 'YetiForce');
Severity: Critical
Found in tests/Base/A_User.php by phan

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

        $this->assertSame((new \App\Db\Query())->select(['roleid'])->from('vtiger_user2role')->where(['userid' => self::$id])->scalar(), 'H2');
Severity: Critical
Found in tests/Base/A_User.php by phan

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

        $db->createCommand()->update('vtiger_password', ['val' => 'false'], ['type' => 'special'])->execute();
Severity: Critical
Found in tests/Base/A_User.php by phan

Call to undeclared method \Tests\Base\A_User::assertSame
Open

        $this->assertSame((new \App\Db\Query())->select(['roleid'])->from('vtiger_user2role')->where(['userid' => self::$id])->scalar(), 'H2');
Severity: Critical
Found in tests/Base/A_User.php by phan

Call to undeclared method \Tests\Base\A_User::assertIsInt
Open

        $this->assertIsInt(self::createUsersRecord()->getId());
Severity: Critical
Found in tests/Base/A_User.php by phan

Call to undeclared method \Tests\Base\A_User::assertSame
Open

        $this->assertSame($row['first_name'], 'Test');
Severity: Critical
Found in tests/Base/A_User.php by phan

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

        $db->createCommand()->update('vtiger_password', ['val' => 'false'], ['type' => 'big_letters'])->execute();
Severity: Critical
Found in tests/Base/A_User.php by phan

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

        $db->createCommand()->update('vtiger_password', ['val' => 'false'], ['type' => 'small_letters'])->execute();
Severity: Critical
Found in tests/Base/A_User.php by phan

Call to undeclared method \Tests\Base\A_User::assertSame
Open

        $this->assertSame($row['email1'], 'testuser@yetiforce.com');
Severity: Critical
Found in tests/Base/A_User.php by phan

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

        $row = (new \App\Db\Query())->from('vtiger_users')->where(['id' => self::$id])->one();
Severity: Critical
Found in tests/Base/A_User.php by phan

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

        $db->createCommand()->update('vtiger_password', ['val' => 4], ['type' => 'min_length'])->execute();
Severity: Critical
Found in tests/Base/A_User.php by phan

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

        $db->createCommand()->update('vtiger_password', ['val' => 'false'], ['type' => 'numbers'])->execute();
Severity: Critical
Found in tests/Base/A_User.php by phan

Call to undeclared method \Tests\Base\A_User::assertSame
Open

        $this->assertSame($row['user_name'], 'testuseredit');
Severity: Critical
Found in tests/Base/A_User.php by phan

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

        if (($userId = \App\User::getUserIdByName($login))) {
Severity: Critical
Found in tests/Base/A_User.php by phan

Call to undeclared method \Tests\Base\A_User::assertIsInt
Open

        $this->assertIsInt(self::$id);
Severity: Critical
Found in tests/Base/A_User.php by phan

Call to undeclared method \Tests\Base\A_User::assertSame
Open

        $this->assertSame($row['user_name'], 'testuser');
Severity: Critical
Found in tests/Base/A_User.php by phan

Call to undeclared method \Tests\Base\A_User::assertCount
Open

        $this->assertCount(0, $locks, 'Unexpected value in lock array');
Severity: Critical
Found in tests/Base/A_User.php by phan

Call to undeclared method \Tests\Base\A_User::assertSame
Open

        $this->assertSame($row['last_name'], 'YetiForce edit');
Severity: Critical
Found in tests/Base/A_User.php by phan

Call to undeclared method \Tests\Base\A_User::assertSame
Open

        $this->assertSame($row['first_name'], 'Test edit');
Severity: Critical
Found in tests/Base/A_User.php by phan

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

        $this->assertSame((new \App\Db\Query())->select(['roleid'])->from('vtiger_user2role')->where(['userid' => self::$id])->scalar(), 'H1');
Severity: Critical
Found in tests/Base/A_User.php by phan

Call to undeclared method \Tests\Base\A_User::assertSame
Open

        $this->assertSame((new \App\Db\Query())->select(['roleid'])->from('vtiger_user2role')->where(['userid' => self::$id])->scalar(), 'H1');
Severity: Critical
Found in tests/Base/A_User.php by phan

Call to undeclared method \Tests\Base\A_User::assertFalse
Open

        $this->assertFalse((new \App\Db\Query())->from('vtiger_users')->where(['id' => self::$id])->exists(), 'The record was not removed from the database ID: ' . self::$id);
Severity: Critical
Found in tests/Base/A_User.php by phan

Call to undeclared method \Tests\Base\A_User::assertSame
Open

        $this->assertSame(['H6' => ['copy', 'paste']], $moduleModel->getLocks(), 'Unexpected value in lock array');
Severity: Critical
Found in tests/Base/A_User.php by phan

Call to undeclared method \Tests\Base\A_User::assertNotNull
Open

        $this->assertNotNull($moduleModel, 'Object is null');
Severity: Critical
Found in tests/Base/A_User.php by phan

Call to undeclared method \Tests\Base\A_User::assertFileExists
Open

        $this->assertFileExists('user_privileges/locks.php');
Severity: Critical
Found in tests/Base/A_User.php by phan

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

        $this->assertFalse((new \App\Db\Query())->from('vtiger_users')->where(['id' => self::$id])->exists(), 'The record was not removed from the database ID: ' . self::$id);
Severity: Critical
Found in tests/Base/A_User.php by phan

Call to undeclared method \Tests\Base\A_User::assertSame
Open

        $this->assertSame($row['email1'], 'testuser-edit@yetiforce.com');
Severity: Critical
Found in tests/Base/A_User.php by phan

Call to undeclared method \Tests\Base\A_User::assertNotNull
Open

        $this->assertNotNull($moduleModel, 'Object is null');
Severity: Critical
Found in tests/Base/A_User.php by phan

Call to undeclared method \Tests\Base\A_User::assertFileExists
Open

        $this->assertFileExists('user_privileges/locks.php');
Severity: Critical
Found in tests/Base/A_User.php by phan

Argument 1 (data) is '' but \Settings_Users_Module_Model::saveLocks() takes array defined at /code/modules/Settings/Users/models/Module.php:169
Open

        $moduleModel->saveLocks($param);
Severity: Minor
Found in tests/Base/A_User.php by phan

Call to undeclared method \Tests\Base\A_User::assertNotFalse
Open

        $this->assertNotFalse($currentUserModel, 'No current user');
Severity: Critical
Found in tests/Base/A_User.php by phan

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

    private static $id;
Severity: Minor
Found in tests/Base/A_User.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

The class A_User is not named in CamelCase.
Open

class A_User extends \Tests\Base
{
    /**
     * The default user password.
     *
Severity: Minor
Found in tests/Base/A_User.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

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

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

     *
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

     * @var string
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

     * User id.
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

     *
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $user->set('email1', "{$login}@yetiforce.com");
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $user->set('confirm_password', self::$defaultPassrowd);
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

    }
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $user->set('last_name', 'YetiForce');
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        self::$id = $user->getId();
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $this->assertNotFalse($row, 'No record id: ' . self::$id);
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $this->assertSame($row['last_name'], 'YetiForce edit');
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

    }
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $this->assertFileExists('user_privileges/locks.php');
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

    /**
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

     * The default user password.
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

     */
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

     *
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

     * @return \Users_Record_Model
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

     */
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $user->set('first_name', 'Test');
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $user->set('confirm_password', 'testuser');
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $user->set('email1', 'testuser-edit@yetiforce.com');
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        \Users_Record_Model::deleteUserPermanently(self::$id, $currentUserModel->getId());
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

    {
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $locks = $moduleModel->getLocks();
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

    public static $defaultPassrowd = 'Demo12345678T';
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

     *
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

     */
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

    {
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

    /**
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $this->assertSame($row['user_name'], 'testuser');
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $this->assertSame((new \App\Db\Query())->select(['roleid'])->from('vtiger_user2role')->where(['userid' => self::$id])->scalar(), 'H1');
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

     */
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $moduleModel->saveLocks($param);
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

    private static $id;
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

     * List of \Users_Record_Model.
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

     * Create/return users module record model with demo user.
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        if (($userId = \App\User::getUserIdByName($login))) {
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $user->set('user_name', $login);
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        return self::$record[$login] = $user;
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

    }
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

     * Testing user creation.
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

     */
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

    }
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $param = [['user' => 'H6', 'locks' => ['copy', 'paste']]];
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $this->assertSame(['H6' => ['copy', 'paste']], $moduleModel->getLocks(), 'Unexpected value in lock array');
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

     */
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        }
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

    /**
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

Line exceeds 120 characters; contains 143 characters
Open

        $this->assertSame((new \App\Db\Query())->select(['roleid'])->from('vtiger_user2role')->where(['userid' => self::$id])->scalar(), 'H2');
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

    public function testEditUser()
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

    /**
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $param = '';
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $this->assertNotNull($moduleModel, 'Object is null');
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

     * @throws \Exception
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $user->set('roleid', 'H2');
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        \App\User::setCurrentUserId(self::createUsersRecord()->getId());
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $this->assertNotFalse($row, 'No record id: ' . self::$id);
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $this->assertSame($row['email1'], 'testuser@yetiforce.com');
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $user->set('roleid', 'H1');
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $this->assertSame($row['email1'], 'testuser-edit@yetiforce.com');
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $this->assertNotFalse($currentUserModel, 'No current user');
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $user = \Vtiger_Record_Model::getCleanInstance('Users');
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $this->assertSame((new \App\Db\Query())->select(['roleid'])->from('vtiger_user2role')->where(['userid' => self::$id])->scalar(), 'H2');
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $user->set('first_name', 'Test edit');
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

Line exceeds 120 characters; contains 175 characters
Open

        $this->assertFalse((new \App\Db\Query())->from('vtiger_users')->where(['id' => self::$id])->exists(), 'The record was not removed from the database ID: ' . self::$id);
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

     */
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $this->assertFileExists('user_privileges/locks.php');
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $moduleModel->saveLocks($param);
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

     * @param string $login
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

            self::$record[$login] = \Vtiger_Record_Model::getInstanceById($userId, 'Users');
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

    public function testLoadBaseUser()
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $db = \App\Db::getInstance();
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $db->createCommand()->update('vtiger_password', ['val' => 'false'], ['type' => 'numbers'])->execute();
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $this->assertSame($row['user_name'], 'testuseredit');
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $user->set('last_name', 'YetiForce');
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $user->set('user_password', self::$defaultPassrowd);
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $db->createCommand()->update('vtiger_password', ['val' => 4], ['type' => 'min_length'])->execute();
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

    {
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $user->set('user_name', 'testuser');
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $user->set('last_name', 'YetiForce edit');
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

Line exceeds 120 characters; contains 143 characters
Open

        $this->assertSame((new \App\Db\Query())->select(['roleid'])->from('vtiger_user2role')->where(['userid' => self::$id])->scalar(), 'H1');
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

     * Testing user deletion.
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $this->assertCount(0, $locks, 'Unexpected value in lock array');
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

    }
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

    private static $record = [];
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

    public static function createUsersRecord($login = 'demo')
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $db->createCommand()->update('vtiger_password', ['val' => 'false'], ['type' => 'big_letters'])->execute();
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

    public function testAddUser()
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $user->set('email1', 'testuser@yetiforce.com');
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $this->assertNotFalse($user, 'No user');
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

    }
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $this->assertFalse((new \App\Db\Query())->from('vtiger_users')->where(['id' => self::$id])->exists(), 'The record was not removed from the database ID: ' . self::$id);
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

     * Testing locks creation.
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

     * @var \Users_Record_Model[]
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $user = \Vtiger_Record_Model::getCleanInstance('Users');
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $user->set('user_password', 'testuser');
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

     */
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

    public function testDeleteUser()
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $moduleModel = \Settings_Users_Module_Model::getInstance();
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

     * Testing locks deletion.
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

    /**
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

            return self::$record[$login];
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $user->set('roleid', 'H2');
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $user->save();
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $this->assertIsInt(self::$id);
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $row = (new \App\Db\Query())->from('vtiger_users')->where(['id' => self::$id])->one();
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

    /**
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $this->assertSame($row['first_name'], 'Test edit');
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

    /**
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $currentUserModel = \Users_Record_Model::getCurrentUserModel();
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

    public function testLocksUser()
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

    /**
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

    public function testDeleteLocksUser()
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $moduleModel = \Settings_Users_Module_Model::getInstance();
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

    /**
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        }
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $db->createCommand()->update('vtiger_password', ['val' => 'false'], ['type' => 'special'])->execute();
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $this->assertIsInt(self::createUsersRecord()->getId());
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $this->assertSame($row['last_name'], 'YetiForce');
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

    {
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $user = \Vtiger_Record_Model::getInstanceById(self::$id, 'Users');
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $this->assertNotNull($moduleModel, 'Object is null');
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

     */
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

     *
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

    {
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

            return self::$record[$login];
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $user->set('is_admin', 'on');
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

     * Testing user edition.
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $user->set('user_name', 'testuseredit');
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $user->save();
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

     * @codeCoverageIgnore
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $db->createCommand()->update('vtiger_password', ['val' => 'false'], ['type' => 'small_letters'])->execute();
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

    /**
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

     */
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

     *
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        if (isset(self::$record[$login])) {
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $user->set('first_name', 'Demo');
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $user->save();
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

     * Testing user creation.
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $this->assertSame($row['first_name'], 'Test');
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

    }
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

        $row = (new \App\Db\Query())->from('vtiger_users')->where(['id' => self::$id])->one();
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

    {
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

    {
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

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

class A_User extends \Tests\Base
Severity: Minor
Found in tests/Base/A_User.php by phpcodesniffer

There are no issues that match your filters.

Category
Status