| Total Complexity | 10 |
| Total Lines | 49 |
| Duplicated Lines | 0 % |
| Coverage | 55.56% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | final class TokenBinding |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var string |
||
| 13 | */ |
||
| 14 | private $status; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var ByteBuffer|null |
||
| 18 | */ |
||
| 19 | private $id; |
||
| 20 | |||
| 21 | 3 | public function __construct(string $status, ?ByteBuffer $id) |
|
| 35 | 2 | } |
|
| 36 | |||
| 37 | 2 | public function getStatus(): string |
|
| 38 | { |
||
| 39 | 2 | return $this->status; |
|
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @return ByteBuffer Returns the token binding ID |
||
| 44 | * |
||
| 45 | * @throws NotAvailableException |
||
| 46 | */ |
||
| 47 | public function getId(): ByteBuffer |
||
| 48 | { |
||
| 49 | if ($this->id === null) { |
||
| 50 | throw new NotAvailableException('No token binding ID available.'); |
||
| 51 | } |
||
| 52 | return $this->id; |
||
| 53 | } |
||
| 54 | |||
| 55 | public function hasId(): bool |
||
| 58 | } |
||
| 59 | } |
||
| 60 |