Skip to content

Commit

Permalink
Update Rand.php
Browse files Browse the repository at this point in the history
  • Loading branch information
ezoheux authored Jan 8, 2019
1 parent bd6bdb4 commit 52e589e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Rand.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,11 @@ public function getString(int $length = 16, string $keyspace = '0123456789abcdef
* @param int $length The code length.
*
* @return int Returns the two factor code.
*
* @codeCoverageIgnore
*/
public function getTwoFactorCode(int $length = 6): int
{
return intval($this->getString('0123456789'));
return intval($this->getString($length, '0123456789'));
}
}

0 comments on commit 52e589e

Please sign in to comment.