YetiForceCompany/YetiForceCRM

View on GitHub
tests/Settings/Roles.php

Summary

Maintainability
A
2 hrs
Test Coverage
A
100%

Method testAddRole has 36 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function testAddRole()
    {
        $recordModel = new \Settings_Roles_Record_Model();
        $parentRole = \Settings_Roles_Record_Model::getInstanceById('H2');
        $this->assertNotNull($parentRole);
Severity: Minor
Found in tests/Settings/Roles.php - About 1 hr to fix

    Method testEditRole has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function testEditRole()
        {
            $recordModel = \Settings_Roles_Record_Model::getInstanceById(self::$id);
            $this->assertNotNull($recordModel);
    
    
    Severity: Minor
    Found in tests/Settings/Roles.php - About 1 hr to fix

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

              $row = (new \App\Db\Query())->from('vtiger_role')->where(['roleid' => self::$id])->one();
      Severity: Minor
      Found in tests/Settings/Roles.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 '26', column '22').
      Open

              $recordModel = new \Settings_Roles_Record_Model();
      Severity: Minor
      Found in tests/Settings/Roles.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 '48', column '15').
      Open

              $row = (new \App\Db\Query())->from('vtiger_role')->where(['roleid' => self::$id])->one();
      Severity: Minor
      Found in tests/Settings/Roles.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 '75', column '15').
      Open

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

              $this->assertFalse((new \App\Db\Query())->from('vtiger_role')->where(['roleid' => self::$id])->exists(), 'The record was not removed from the database ID: ' . self::$id);
      Severity: Minor
      Found in tests/Settings/Roles.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 '\Settings_Roles_Record_Model' in method 'testDeleteRole'.
      Open

              $recordModel = \Settings_Roles_Record_Model::getInstanceById(self::$id);
      Severity: Minor
      Found in tests/Settings/Roles.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_Roles_Record_Model' in method 'testAddRole'.
      Open

              $parentRole = \Settings_Roles_Record_Model::getInstanceById('H2');
      Severity: Minor
      Found in tests/Settings/Roles.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_Roles_Record_Model' in method 'testDeleteRole'.
      Open

              $transferToRole = \Settings_Roles_Record_Model::getInstanceById('H6');
      Severity: Minor
      Found in tests/Settings/Roles.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_Roles_Record_Model' in method 'testMoveRole'.
      Open

              $parentRole = \Settings_Roles_Record_Model::getInstanceById('H1');
      Severity: Minor
      Found in tests/Settings/Roles.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_Roles_Record_Model' in method 'testMoveRole'.
      Open

              $recordModel = \Settings_Roles_Record_Model::getInstanceById(self::$id);
      Severity: Minor
      Found in tests/Settings/Roles.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_Roles_Record_Model' in method 'testEditRole'.
      Open

              $recordModel = \Settings_Roles_Record_Model::getInstanceById(self::$id);
      Severity: Minor
      Found in tests/Settings/Roles.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 "previewrelatedrecord" 4 times.
      Open

              $recordModel->set('previewrelatedrecord', 0);
      Severity: Critical
      Found in tests/Settings/Roles.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 "changeowner" 4 times.
      Open

              $recordModel->set('changeowner', 1);
      Severity: Critical
      Found in tests/Settings/Roles.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 "parentrole" 3 times.
      Open

              $this->assertSame($row['parentrole'], 'H1::H2::' . self::$id);
      Severity: Critical
      Found in tests/Settings/Roles.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 "searchunpriv" 4 times.
      Open

              $recordModel->set('searchunpriv', ['Contacts']);
      Severity: Critical
      Found in tests/Settings/Roles.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_role" 4 times.
      Open

              $row = (new \App\Db\Query())->from('vtiger_role')->where(['roleid' => self::$id])->one();
      Severity: Critical
      Found in tests/Settings/Roles.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" 4 times.
      Open

              $row = (new \App\Db\Query())->from('vtiger_role')->where(['roleid' => self::$id])->one();
      Severity: Critical
      Found in tests/Settings/Roles.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 "listrelatedrecord" 4 times.
      Open

              $recordModel->set('listrelatedrecord', 0);
      Severity: Critical
      Found in tests/Settings/Roles.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 "assignedmultiowner" 4 times.
      Open

              $recordModel->set('assignedmultiowner', 1);
      Severity: Critical
      Found in tests/Settings/Roles.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 "allowassignedrecordsto" 4 times.
      Open

              $recordModel->set('allowassignedrecordsto', 1);
      Severity: Critical
      Found in tests/Settings/Roles.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 "permissionsrelatedfield" 4 times.
      Open

              $recordModel->set('permissionsrelatedfield', [0]);
      Severity: Critical
      Found in tests/Settings/Roles.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 "clendarallorecords" 6 times.
      Open

              $recordModel->set('clendarallorecords', 1);
      Severity: Critical
      Found in tests/Settings/Roles.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 "rolename" 4 times.
      Open

              $recordModel->set('rolename', 'Test');
      Severity: Critical
      Found in tests/Settings/Roles.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 "auto_assign" 4 times.
      Open

              $recordModel->set('auto_assign', 1);
      Severity: Critical
      Found in tests/Settings/Roles.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 "editrelatedrecord" 4 times.
      Open

              $recordModel->set('editrelatedrecord', 1);
      Severity: Critical
      Found in tests/Settings/Roles.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 "Contacts" 3 times.
      Open

              $recordModel->set('searchunpriv', ['Contacts']);
      Severity: Critical
      Found in tests/Settings/Roles.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 "globalsearchadv" 4 times.
      Open

              $recordModel->set('globalsearchadv', 1);
      Severity: Critical
      Found in tests/Settings/Roles.php by sonar-php

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

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

      Noncompliant Code Example

      With the default threshold of 3:

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

      Compliant Solution

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

      Exceptions

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

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

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

      Call to undeclared method \Tests\Settings\Roles::assertNotFalse
      Open

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

      Call to undeclared method \Tests\Settings\Roles::assertSame
      Open

              $this->assertSame((string) $row['changeowner'], '1');
      Severity: Critical
      Found in tests/Settings/Roles.php by phan

      Call to undeclared method \Tests\Settings\Roles::assertSame
      Open

              $this->assertSame((string) $row['allowassignedrecordsto'], '1');
      Severity: Critical
      Found in tests/Settings/Roles.php by phan

      Call to undeclared method \Tests\Settings\Roles::assertSame
      Open

              $this->assertSame((string) $row['previewrelatedrecord'], '0');
      Severity: Critical
      Found in tests/Settings/Roles.php by phan

      Call to undeclared method \Tests\Settings\Roles::assertNotNull
      Open

              $this->assertNotNull($recordModel);
      Severity: Critical
      Found in tests/Settings/Roles.php by phan

      Call to undeclared method \Tests\Settings\Roles::assertSame
      Open

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

      Call to undeclared method \Tests\Settings\Roles::assertSame
      Open

              $this->assertSame((string) $row['auto_assign'], '0');
      Severity: Critical
      Found in tests/Settings/Roles.php by phan

      Call to undeclared method \Tests\Settings\Roles::assertSame
      Open

              $this->assertSame($row['parentrole'], 'H1::H2::' . self::$id);
      Severity: Critical
      Found in tests/Settings/Roles.php by phan

      Call to undeclared method \Tests\Settings\Roles::assertSame
      Open

              $this->assertSame((string) $row['clendarallorecords'], '2');
      Severity: Critical
      Found in tests/Settings/Roles.php by phan

      Argument 1 (roleId) is 'H6' but \Settings_Roles_Record_Model::getInstanceById() takes int defined at /code/modules/Settings/Roles/models/Record.php:493
      Open

              $transferToRole = \Settings_Roles_Record_Model::getInstanceById('H6');
      Severity: Minor
      Found in tests/Settings/Roles.php by phan

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

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

      Call to undeclared method \Tests\Settings\Roles::assertSame
      Open

              $this->assertSame($row['permissionsrelatedfield'], '0,1');
      Severity: Critical
      Found in tests/Settings/Roles.php by phan

      Call to undeclared method \Tests\Settings\Roles::assertNotNull
      Open

              $this->assertNotNull($transferToRole);
      Severity: Critical
      Found in tests/Settings/Roles.php by phan

      Call to undeclared method \Tests\Settings\Roles::assertNotNull
      Open

              $this->assertNotNull($parentRole);
      Severity: Critical
      Found in tests/Settings/Roles.php by phan

      Argument 1 (roleId) is 'H1' but \Settings_Roles_Record_Model::getInstanceById() takes int defined at /code/modules/Settings/Roles/models/Record.php:493
      Open

              $parentRole = \Settings_Roles_Record_Model::getInstanceById('H1');
      Severity: Minor
      Found in tests/Settings/Roles.php by phan

      Call to undeclared method \Tests\Settings\Roles::assertSame
      Open

              $this->assertSame($row['parentrole'], 'H1::' . self::$id);
      Severity: Critical
      Found in tests/Settings/Roles.php by phan

      Call to undeclared method \Tests\Settings\Roles::assertSame
      Open

              $this->assertSame((string) $row['assignedmultiowner'], '4');
      Severity: Critical
      Found in tests/Settings/Roles.php by phan

      Call to undeclared method \Tests\Settings\Roles::assertNotNull
      Open

              $this->assertNotNull(self::$id);
      Severity: Critical
      Found in tests/Settings/Roles.php by phan

      Call to undeclared method \Tests\Settings\Roles::assertSame
      Open

              $this->assertSame((string) $row['clendarallorecords'], '1');
      Severity: Critical
      Found in tests/Settings/Roles.php by phan

      Call to undeclared method \Tests\Settings\Roles::assertSame
      Open

              $this->assertSame((string) $row['assignedmultiowner'], '1');
      Severity: Critical
      Found in tests/Settings/Roles.php by phan

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

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

      Call to undeclared method \Tests\Settings\Roles::assertSame
      Open

              $this->assertSame($row['searchunpriv'], 'Contacts,Accounts');
      Severity: Critical
      Found in tests/Settings/Roles.php by phan

      Call to undeclared method \Tests\Settings\Roles::assertNotNull
      Open

              $this->assertNotNull($recordModel);
      Severity: Critical
      Found in tests/Settings/Roles.php by phan

      Argument 1 (roleId) is 'H2' but \Settings_Roles_Record_Model::getInstanceById() takes int defined at /code/modules/Settings/Roles/models/Record.php:493
      Open

              $parentRole = \Settings_Roles_Record_Model::getInstanceById('H2');
      Severity: Minor
      Found in tests/Settings/Roles.php by phan

      Call to undeclared method \Tests\Settings\Roles::assertSame
      Open

              $this->assertSame($row['searchunpriv'], 'Contacts');
      Severity: Critical
      Found in tests/Settings/Roles.php by phan

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

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

      Call to undeclared method \Tests\Settings\Roles::assertSame
      Open

              $this->assertSame((string) $row['listrelatedrecord'], '1');
      Severity: Critical
      Found in tests/Settings/Roles.php by phan

      Call to undeclared method \Tests\Settings\Roles::assertSame
      Open

              $this->assertSame((string) $row['editrelatedrecord'], '0');
      Severity: Critical
      Found in tests/Settings/Roles.php by phan

      Call to undeclared method \Tests\Settings\Roles::assertFalse
      Open

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

      Call to undeclared method \Tests\Settings\Roles::assertSame
      Open

              $this->assertSame((string) $row['changeowner'], '0');
      Severity: Critical
      Found in tests/Settings/Roles.php by phan

      Call to undeclared method \Tests\Settings\Roles::assertSame
      Open

              $this->assertSame((string) $row['listrelatedrecord'], '0');
      Severity: Critical
      Found in tests/Settings/Roles.php by phan

      Call to undeclared method \Tests\Settings\Roles::assertSame
      Open

              $this->assertSame((string) $row['editrelatedrecord'], '1');
      Severity: Critical
      Found in tests/Settings/Roles.php by phan

      Call to undeclared method \Tests\Settings\Roles::assertSame
      Open

              $this->assertSame((string) $row['globalsearchadv'], '1');
      Severity: Critical
      Found in tests/Settings/Roles.php by phan

      Call to undeclared method \Tests\Settings\Roles::assertSame
      Open

              $this->assertSame((string) $row['previewrelatedrecord'], '1');
      Severity: Critical
      Found in tests/Settings/Roles.php by phan

      Call to undeclared method \Tests\Settings\Roles::assertNotFalse
      Open

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

      Call to undeclared method \Tests\Settings\Roles::assertSame
      Open

              $this->assertSame((string) $row['permissionsrelatedfield'], '0');
      Severity: Critical
      Found in tests/Settings/Roles.php by phan

      Call to undeclared method \Tests\Settings\Roles::assertSame
      Open

              $this->assertSame((string) $row['auto_assign'], '1');
      Severity: Critical
      Found in tests/Settings/Roles.php by phan

      Call to undeclared method \Tests\Settings\Roles::assertSame
      Open

              $this->assertSame((string) $row['allowassignedrecordsto'], '4');
      Severity: Critical
      Found in tests/Settings/Roles.php by phan

      Call to undeclared method \Tests\Settings\Roles::assertSame
      Open

              $this->assertSame($row['parentrole'], 'H1::' . self::$id);
      Severity: Critical
      Found in tests/Settings/Roles.php by phan

      Call to undeclared method \Tests\Settings\Roles::assertSame
      Open

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

      Call to undeclared method \Tests\Settings\Roles::assertSame
      Open

              $this->assertSame((string) $row['globalsearchadv'], '0');
      Severity: Critical
      Found in tests/Settings/Roles.php by phan

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

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

              $recordModel->set('clendarallorecords', 1);
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $recordModel->set('auto_assign', 1);
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $this->assertNotNull(self::$id);
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

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

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

          }
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $recordModel->set('searchunpriv', ['Contacts', 'Accounts']);
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $this->assertSame((string) $row['previewrelatedrecord'], '1');
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $recordModel->set('searchunpriv', ['Contacts']);
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $recordModel->set('editrelatedrecord', 1);
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $recordModel->setParent($parentRole);
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $recordModel->set('permissionsrelatedfield', [0]);
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $this->assertSame((string) $row['changeowner'], '1');
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $this->assertSame((string) $row['auto_assign'], '1');
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

          /**
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $recordModel->set('previewrelatedrecord', 1);
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $this->assertSame((string) $row['changeowner'], '0');
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $this->assertSame($row['searchunpriv'], 'Contacts,Accounts');
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $this->assertSame((string) $row['clendarallorecords'], '2');
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $this->assertSame((string) $row['clendarallorecords'], '1');
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $recordModel->set('clendarallorecords', 2);
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $this->assertSame((string) $row['listrelatedrecord'], '1');
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

           * Role id.
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

          {
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $recordModel->set('rolename', 'Test');
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

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

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

              $this->assertSame((string) $row['editrelatedrecord'], '1');
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $recordModel->set('globalsearchadv', 0);
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $this->assertNotNull($parentRole);
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $this->assertSame((string) $row['globalsearchadv'], '1');
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

          {
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $this->assertSame($row['parentrole'], 'H1::' . self::$id);
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $this->assertSame((string) $row['globalsearchadv'], '0');
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

          /**
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

           */
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

           * Testing role creation.
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $recordModel->set('listrelatedrecord', 0);
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $this->assertSame((string) $row['previewrelatedrecord'], '0');
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $recordModel = \Settings_Roles_Record_Model::getInstanceById(self::$id);
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $recordModel->moveTo($parentRole);
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $recordModel = \Settings_Roles_Record_Model::getInstanceById(self::$id);
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $recordModel->set('rolename', 'Test edit');
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

          }
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

          /**
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $recordModel->set('clendarallorecords', 1);
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $this->assertNotNull($recordModel);
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $recordModel->set('listrelatedrecord', 1);
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $recordModel->set('assignedmultiowner', 4);
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $recordModel->set('auto_assign', 0);
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

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

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

          /**
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $recordModel = new \Settings_Roles_Record_Model();
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $this->assertSame((string) $row['listrelatedrecord'], '0');
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

           */
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

          public function testDeleteRole()
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $this->assertNotNull($transferToRole);
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $recordModel->save();
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $parentRole = \Settings_Roles_Record_Model::getInstanceById('H1');
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $this->assertSame($row['parentrole'], 'H1::' . self::$id);
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $recordModel->set('allowassignedrecordsto', 4);
      Severity: Minor
      Found in tests/Settings/Roles.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/Settings/Roles.php by phpcodesniffer

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

           * Testing role deletion.
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $recordModel->delete($transferToRole);
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $recordModel->set('globalsearchadv', 1);
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

           * Testing move role.
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $recordModel->setParent($parentRole);
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

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

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

              $recordModel = \Settings_Roles_Record_Model::getInstanceById(self::$id);
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $transferToRole = \Settings_Roles_Record_Model::getInstanceById('H6');
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $parentRole = \Settings_Roles_Record_Model::getInstanceById('H2');
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $recordModel->set('changeowner', 1);
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

          }
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

          /**
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

          public function testEditRole()
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $recordModel->set('changeowner', 0);
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $recordModel->set('clendarallorecords', 2);
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

      Line exceeds 120 characters; contains 178 characters
      Open

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

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

              $recordModel->set('profileIds', ['1']);
      Severity: Minor
      Found in tests/Settings/Roles.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/Settings/Roles.php by phpcodesniffer

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

              $this->assertSame($row['parentrole'], 'H1::H2::' . self::$id);
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $this->assertSame((string) $row['permissionsrelatedfield'], '0');
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

          public function testMoveRole()
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

           */
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $recordModel->save();
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $this->assertSame((string) $row['allowassignedrecordsto'], '4');
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $recordModel->set('previewrelatedrecord', 0);
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $this->assertSame((string) $row['allowassignedrecordsto'], '1');
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $this->assertSame((string) $row['assignedmultiowner'], '4');
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $this->assertSame((string) $row['assignedmultiowner'], '1');
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

          {
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $this->assertSame((string) $row['editrelatedrecord'], '0');
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $this->assertSame((string) $row['auto_assign'], '0');
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

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

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

           */
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

          public function testAddRole()
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              self::$id = $recordModel->getId();
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $this->assertSame($row['searchunpriv'], 'Contacts');
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

           * Testing role edition.
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $recordModel->set('editrelatedrecord', 0);
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $this->assertSame($row['permissionsrelatedfield'], '0,1');
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

          }
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

          {
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

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

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

              $recordModel->set('allowassignedrecordsto', 1);
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

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

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

              $recordModel->set('permissionsrelatedfield', [0, 1]);
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $this->assertNotNull($recordModel);
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

              $recordModel->set('assignedmultiowner', 1);
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

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

           */
      Severity: Minor
      Found in tests/Settings/Roles.php by phpcodesniffer

      There are no issues that match your filters.

      Category
      Status