Heimdall/vendor/knplabs/github-api/lib/Github/Exception/TwoFactorAuthenticationRequiredException.php

31 lines
646 B
PHP
Raw Normal View History

2018-10-18 14:59:38 +00:00
<?php
namespace Github\Exception;
2022-03-10 11:54:29 +00:00
use Throwable;
2018-10-18 14:59:38 +00:00
class TwoFactorAuthenticationRequiredException extends RuntimeException
{
2022-03-10 11:54:29 +00:00
/** @var string */
2018-10-18 14:59:38 +00:00
private $type;
2022-03-10 11:54:29 +00:00
/**
* @param string $type
* @param int $code
* @param Throwable|null $previous
*/
public function __construct(string $type, int $code = 0, Throwable $previous = null)
2018-10-18 14:59:38 +00:00
{
$this->type = $type;
parent::__construct('Two factor authentication is enabled on this account', $code, $previous);
}
2022-03-10 11:54:29 +00:00
/**
* @return string
*/
public function getType(): string
2018-10-18 14:59:38 +00:00
{
return $this->type;
}
}