aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/spomky-labs/otphp/src/TOTP.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2024-09-30 07:11:05 +0000
committerMario <mario@mariovavti.com>2024-09-30 07:11:05 +0000
commit3f411787c1436e2259efb184c0f84b13f4244fb0 (patch)
treeafb3777ac9ba95d9c30c4dbb66ea82e0c6636f79 /vendor/spomky-labs/otphp/src/TOTP.php
parent5782a674b0cb490f1e3544e5dcb0f7e969361df3 (diff)
downloadvolse-hubzilla-3f411787c1436e2259efb184c0f84b13f4244fb0.tar.gz
volse-hubzilla-3f411787c1436e2259efb184c0f84b13f4244fb0.tar.bz2
volse-hubzilla-3f411787c1436e2259efb184c0f84b13f4244fb0.zip
update spomky-labs/otphp
Diffstat (limited to 'vendor/spomky-labs/otphp/src/TOTP.php')
-rw-r--r--vendor/spomky-labs/otphp/src/TOTP.php34
1 files changed, 16 insertions, 18 deletions
diff --git a/vendor/spomky-labs/otphp/src/TOTP.php b/vendor/spomky-labs/otphp/src/TOTP.php
index 3a7d72870..8a1cfeba1 100644
--- a/vendor/spomky-labs/otphp/src/TOTP.php
+++ b/vendor/spomky-labs/otphp/src/TOTP.php
@@ -4,8 +4,8 @@ declare(strict_types=1);
namespace OTPHP;
-use function assert;
use InvalidArgumentException;
+use function assert;
use function is_int;
/**
@@ -133,23 +133,21 @@ final class TOTP extends OTP implements TOTPInterface
*/
protected function getParameterMap(): array
{
- return array_merge(
- parent::getParameterMap(),
- [
- 'period' => static function ($value): int {
- (int) $value > 0 || throw new InvalidArgumentException('Period must be at least 1.');
-
- return (int) $value;
- },
- 'epoch' => static function ($value): int {
- (int) $value >= 0 || throw new InvalidArgumentException(
- 'Epoch must be greater than or equal to 0.'
- );
-
- return (int) $value;
- },
- ]
- );
+ return [
+ ...parent::getParameterMap(),
+ 'period' => static function ($value): int {
+ (int) $value > 0 || throw new InvalidArgumentException('Period must be at least 1.');
+
+ return (int) $value;
+ },
+ 'epoch' => static function ($value): int {
+ (int) $value >= 0 || throw new InvalidArgumentException(
+ 'Epoch must be greater than or equal to 0.'
+ );
+
+ return (int) $value;
+ },
+ ];
}
/**