| Total Complexity | 6 |
| Total Lines | 54 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | final class AuthorizationStatus |
||
| 10 | { |
||
| 11 | private bool $success; |
||
| 12 | private array $topics; |
||
| 13 | private array $attributes; |
||
| 14 | private ?ResponseInterface $response; |
||
| 15 | |||
| 16 | 8 | public function __construct( |
|
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Check if authorization status is successful. |
||
| 30 | */ |
||
| 31 | 3 | public function isSuccessful(): bool |
|
| 32 | { |
||
| 33 | 3 | return $this->success; |
|
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Get list of authorized topics. |
||
| 38 | */ |
||
| 39 | 1 | public function getTopics(): array |
|
| 42 | } |
||
| 43 | |||
| 44 | 1 | public function getAttributes(): array |
|
| 45 | { |
||
| 46 | 1 | return $this->attributes; |
|
| 47 | } |
||
| 48 | |||
| 49 | /** |
||
| 50 | * Check if response is set. |
||
| 51 | */ |
||
| 52 | 5 | public function hasResponse(): bool |
|
| 53 | { |
||
| 54 | 5 | return $this->response !== null; |
|
| 55 | } |
||
| 56 | |||
| 57 | /** |
||
| 58 | * Get response object. |
||
| 59 | */ |
||
| 60 | 3 | public function getResponse(): ?ResponseInterface |
|
| 63 | } |
||
| 64 | } |
||
| 65 |