| 1 |
<?php |
| 2 |
|
| 3 |
declare(strict_types=1); |
| 4 |
|
| 5 |
namespace OTPHP\Exception; |
| 6 |
|
| 7 |
use InvalidArgumentException; |
| 8 |
use Throwable; |
| 9 |
|
| 10 |
/** |
| 11 |
* Exception thrown when an OTP parameter has an invalid value. |
| 12 |
* This includes: secret, digits, algorithm, period, epoch, counter, secret size. |
| 13 |
*/ |
| 14 |
final class InvalidParameterException extends InvalidArgumentException implements OTPExceptionInterface |
| 15 |
{ |
| 16 |
public function __construct( |
| 17 |
string $message, |
| 18 |
public readonly string $parameterName = '', |
| 19 |
public readonly mixed $parameterValue = null, |
| 20 |
int $code = 0, |
| 21 |
?Throwable $previous = null |
| 22 |
) { |
| 23 |
parent::__construct($message, $code, $previous); |
| 24 |
} |
| 25 |
} |