src/helpers/OtpHelper.php
Method getHotp
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static function getHotp($label = '', $digits = 6, $digest = 'sha1', $counter = 0, $issuer='')
Method getTotp
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public static function getTotp($label = '', $digits = 6, $digest = 'sha1', $interval = 30, $issuer='')
Avoid using static access to class '\ParagonIE\ConstantTime\Base32' in method 'generateSecret'. Open
Open
$full = Base32::encode($security->generateRandomString($length));
- 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
Incorrect spacing between default value and equals sign for argument "$issuer"; expected 1 but found 0 Open
Open
public static function getTotp($label = '', $digits = 6, $digest = 'sha1', $interval = 30, $issuer='')
- Exclude checks
Incorrect spacing between default value and equals sign for argument "$issuer"; expected 1 but found 0 Open
Open
public static function getHotp($label = '', $digits = 6, $digest = 'sha1', $counter = 0, $issuer='')
- Exclude checks
Incorrect spacing between argument "$issuer" and equals sign; expected 1 but found 0 Open
Open
public static function getHotp($label = '', $digits = 6, $digest = 'sha1', $counter = 0, $issuer='')
- Exclude checks
Incorrect spacing between argument "$issuer" and equals sign; expected 1 but found 0 Open
Open
public static function getTotp($label = '', $digits = 6, $digest = 'sha1', $interval = 30, $issuer='')
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
Open
if(!empty($issuer)) {
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
Open
if(!empty($issuer)) {
- Exclude checks