Missing class import via use statement (line '69', column '15'). Open
$row = (new \App\Db\Query())
- Read upRead up
- Exclude checks
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 '50', column '21'). Open
$authMethod = new \Users_Totp_Authmethod(\App\User::getCurrentUserRealId());
- Read upRead up
- Exclude checks
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\Config' in method 'testConfig'. Open
\App\Config::set('main', 'systemMode', 'prod');
- Read upRead up
- Exclude checks
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\Config' in method 'testConfig'. Open
\App\Config::set('main', 'systemMode', 'demo');
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\App\User' in method 'testUser'. Open
self::$userId = \App\User::getUserIdByName('demo');
- Read upRead up
- Exclude checks
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\Config' in method 'testConfig'. Open
\App\Config::set('security', 'USER_AUTHY_MODE', 'TOTP_OFF');
- Read upRead up
- Exclude checks
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\Config' in method 'tearDownAfterClass'. Open
\App\Config::set('security', 'USER_AUTHY_MODE', self::$userAuthyMode);
- Read upRead up
- Exclude checks
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\Cache' in method 'tearDownAfterClass'. Open
\App\Cache::clear();
- Read upRead up
- Exclude checks
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\Config' in method 'testConfig'. Open
$this->assertSame(\App\Config::security('USER_AUTHY_MODE'), 'TOTP_OFF', 'Problem with saving the configuration');
- Read upRead up
- Exclude checks
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\Config' in method 'testConfig'. Open
\App\Config::set('security', 'USER_AUTHY_MODE', 'TOTP_OBLIGATORY');
- Read upRead up
- Exclude checks
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\Config' in method 'setUpBeforeClass'. Open
self::$userAuthyMode = \App\Config::security('USER_AUTHY_MODE');
- Read upRead up
- Exclude checks
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 'testUser'. Open
$userRecordModel = \Users_Record_Model::getInstanceById(self::$userId, 'Users');
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\App\User' in method 'testVerifyCode'. Open
$authMethod = new \Users_Totp_Authmethod(\App\User::getCurrentUserRealId());
- Read upRead up
- Exclude checks
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\Config' in method 'setUpBeforeClass'. Open
self::$systemMode = \App\Config::main('systemMode');
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\App\User' in method 'testUser'. Open
\App\User::setCurrentUserId(self::$userId);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\App\User' in method 'testUser'. Open
$this->assertSame(\App\User::getCurrentUserId(), self::$userId);
- Read upRead up
- Exclude checks
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_Totp_Authmethod' in method 'testConfig'. Open
$this->assertFalse(\Users_Totp_Authmethod::isActive());
- Read upRead up
- Exclude checks
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_Totp_Authmethod' in method 'testConfig'. Open
$this->assertFalse(\Users_Totp_Authmethod::isActive());
- Read upRead up
- Exclude checks
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\Config' in method 'tearDownAfterClass'. Open
\App\Config::set('main', 'systemMode', self::$systemMode);
- Read upRead up
- Exclude checks
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 "security" 3 times. Open
\App\Config::set('security', 'USER_AUTHY_MODE', 'TOTP_OFF');
- Read upRead up
- Exclude checks
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_AUTHY_MODE" 5 times. Open
self::$userAuthyMode = \App\Config::security('USER_AUTHY_MODE');
- Read upRead up
- Exclude checks
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 "authy_methods" 3 times. Open
$userRecordModel->set('authy_methods', '');
- Read upRead up
- Exclude checks
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 "authy_secret_totp" 3 times. Open
$userRecordModel->set('authy_secret_totp', '');
- Read upRead up
- Exclude checks
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 "systemMode" 4 times. Open
self::$systemMode = \App\Config::main('systemMode');
- Read upRead up
- Exclude checks
Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences.
On the other hand, constants can be referenced from many places, but only need to be updated in a single place.
Noncompliant Code Example
With the default threshold of 3:
function run() { prepare('action1'); // Non-Compliant - 'action1' is duplicated 3 times execute('action1'); release('action1'); }
Compliant Solution
ACTION_1 = 'action1'; function run() { prepare(ACTION_1); execute(ACTION_1); release(ACTION_1); }
Exceptions
To prevent generating some false-positives, literals having less than 5 characters are excluded.
Call to undeclared method \App\Db\Query::select
Open
$row = (new \App\Db\Query())
- Exclude checks
Call to method getCurrentUserId
from undeclared class \App\User
(Did you mean class \Tests\App\User) Open
$this->assertSame(\App\User::getCurrentUserId(), self::$userId);
- Exclude checks
Call to undeclared method \Tests\Base\Z_Authy2FA::assertIsInt
Open
$this->assertIsInt(self::$userId, 'No user demo');
- Exclude checks
Call to undeclared method \Tests\Base\Z_Authy2FA::assertNotFalse
Open
$this->assertNotFalse($row, 'No record id: ' . self::$userId);
- Exclude checks
Call to undeclared method \Tests\Base\Z_Authy2FA::assertEmpty
Open
$this->assertEmpty($row['authy_methods']);
- Exclude checks
Call to undeclared method \Tests\Base\Z_Authy2FA::assertFalse
Open
$this->assertFalse(\Users_Totp_Authmethod::isActive());
- Exclude checks
Call to method getCurrentUserRealId
from undeclared class \App\User
(Did you mean class \Tests\App\User) Open
$authMethod = new \Users_Totp_Authmethod(\App\User::getCurrentUserRealId());
- Exclude checks
Property \Tests\Base\Z_Authy2FA::$transaction
has undeclared type \yii\db\Transaction
Open
private static $transaction;
- Exclude checks
Call to undeclared method \Tests\Base\Z_Authy2FA::assertTrue
Open
$this->assertTrue($authMethod->verifyCode($secret, $authMethod->getCode()), 'The "verifyCode" method does not work');
- Exclude checks
Call to undeclared method \Tests\Base\Z_Authy2FA::assertFalse
Open
$this->assertFalse(\Users_Totp_Authmethod::isActive());
- Exclude checks
Call to undeclared method \App\Db::beginTransaction
Open
self::$transaction = \App\Db::getInstance()->beginTransaction();
- Exclude checks
Call to method getUserIdByName
from undeclared class \App\User
(Did you mean class \Tests\App\User) Open
self::$userId = \App\User::getUserIdByName('demo');
- Exclude checks
Call to method rollBack
from undeclared class \yii\db\Transaction
Open
self::$transaction->rollBack();
- Exclude checks
Call to undeclared method \Tests\Base\Z_Authy2FA::assertFalse
Open
$this->assertFalse($authMethod->verifyCode($secret, '123000'), 'The "verifyCode" method does not work');
- Exclude checks
Call to method setCurrentUserId
from undeclared class \App\User
(Did you mean class \Tests\App\User) Open
\App\User::setCurrentUserId(self::$userId);
- Exclude checks
Call to undeclared method \Tests\Base\Z_Authy2FA::assertSame
Open
$this->assertSame(\App\User::getCurrentUserId(), self::$userId);
- Exclude checks
Call to undeclared method \Tests\Base\Z_Authy2FA::assertEmpty
Open
$this->assertEmpty($row['authy_secret_totp']);
- Exclude checks
Call to undeclared method \Tests\Base\Z_Authy2FA::assertSame
Open
$this->assertSame(\App\Config::security('USER_AUTHY_MODE'), 'TOTP_OFF', 'Problem with saving the configuration');
- Exclude checks
The class Z_Authy2FA is not named in CamelCase. Open
class Z_Authy2FA extends \Tests\Base
{
/**
* @var \yii\db\Transaction
*/
- Read upRead up
- Exclude checks
CamelCaseClassName
Since: 0.2
It is considered best practice to use the CamelCase notation to name classes.
Example
class class_name {
}
Source
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @var \yii\db\Transaction
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function testUser()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @codeCoverageIgnore
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
self::$userAuthyMode = \App\Config::security('USER_AUTHY_MODE');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Test method "verifyCode".
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertFalse($authMethod->verifyCode($secret, '123000'), 'The "verifyCode" method does not work');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @var int
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$secret = $authMethod->createSecret();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Setting of tests.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function testVerifyCode()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
self::$systemMode = \App\Config::main('systemMode');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
private static $userId;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
private static $systemMode;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public static function setUpBeforeClass(): void
- Exclude checks
Line exceeds 120 characters; contains 125 characters Open
$this->assertTrue($authMethod->verifyCode($secret, $authMethod->getCode()), 'The "verifyCode" method does not work');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
private static $transaction;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
private static $userAuthyMode;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$authMethod = new \Users_Totp_Authmethod(\App\User::getCurrentUserRealId());
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertTrue($authMethod->verifyCode($secret, $authMethod->getCode()), 'The "verifyCode" method does not work');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Test user for 2FA.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$userRecordModel = \Users_Record_Model::getInstanceById(self::$userId, 'Users');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public function testConfig(): void
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
\App\Config::set('main', 'systemMode', self::$systemMode);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Line exceeds 120 characters; contains 121 characters Open
$this->assertSame(\App\Config::security('USER_AUTHY_MODE'), 'TOTP_OFF', 'Problem with saving the configuration');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @var string
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @var string
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
->select(['authy_secret_totp', 'authy_methods'])
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Test config for 2FA.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
self::$transaction = \App\Db::getInstance()->beginTransaction();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
\App\Config::set('security', 'USER_AUTHY_MODE', 'TOTP_OFF');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
\App\Config::set('security', 'USER_AUTHY_MODE', self::$userAuthyMode);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
\App\Config::set('main', 'systemMode', 'demo');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertIsInt(self::$userId, 'No user demo');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
->one();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertEmpty($row['authy_methods']);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Cleaning after tests.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$userRecordModel->set('authy_secret_totp', '');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$userRecordModel->set('authy_methods', '');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$userRecordModel->save();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
->where(['id' => self::$userId])
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertFalse(\Users_Totp_Authmethod::isActive());
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
\App\User::setCurrentUserId(self::$userId);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
\App\Config::set('main', 'systemMode', 'prod');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
self::$userId = \App\User::getUserIdByName('demo');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
->from('vtiger_users')
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertEmpty($row['authy_secret_totp']);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertFalse(\Users_Totp_Authmethod::isActive());
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
self::$transaction->rollBack();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$row = (new \App\Db\Query())
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertSame(\App\Config::security('USER_AUTHY_MODE'), 'TOTP_OFF', 'Problem with saving the configuration');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
\App\Cache::clear();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertSame(\App\User::getCurrentUserId(), self::$userId);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$this->assertNotFalse($row, 'No record id: ' . self::$userId);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
\App\Config::set('security', 'USER_AUTHY_MODE', 'TOTP_OBLIGATORY');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public static function tearDownAfterClass(): void
- Exclude checks
Class name "Z_Authy2FA" is not in camel caps format Open
class Z_Authy2FA extends \Tests\Base
- Exclude checks