| Total Complexity | 5 |
| Total Lines | 54 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | final class SafetyNetResponse implements SafetyNetResponseInterface |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var string |
||
| 11 | */ |
||
| 12 | private $nonce; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var X509Certificate[] |
||
| 16 | */ |
||
| 17 | private $x5c; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var bool |
||
| 21 | */ |
||
| 22 | private $ctsProfileMatch; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @var int|float |
||
| 26 | */ |
||
| 27 | private $timestampMs; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @param int|float $timestampMs |
||
| 31 | */ |
||
| 32 | 2 | public function __construct(string $nonce, array $x5c, bool $ctsProfileMatch, $timestampMs) |
|
| 38 | 2 | } |
|
| 39 | |||
| 40 | 2 | public function getNonce(): string |
|
| 41 | { |
||
| 42 | 2 | return $this->nonce; |
|
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @return X509Certificate[] |
||
| 47 | */ |
||
| 48 | 2 | public function getCertificateChain(): array |
|
| 49 | { |
||
| 50 | 2 | return $this->x5c; |
|
| 51 | } |
||
| 52 | |||
| 53 | 2 | public function isCtsProfileMatch(): bool |
|
| 54 | { |
||
| 55 | 2 | return $this->ctsProfileMatch; |
|
| 56 | } |
||
| 57 | |||
| 58 | 1 | public function getTimestampMs() |
|
| 61 | } |
||
| 62 | } |
||
| 63 |