Total Complexity | 4 |
Total Lines | 36 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
12 | trait ReferenceTimeValidation |
||
13 | { |
||
14 | /** |
||
15 | * Validate the claim against given constraint. |
||
16 | * |
||
17 | * @param mixed $constraint |
||
18 | * |
||
19 | * @return bool |
||
20 | */ |
||
21 | abstract public function validate($constraint): bool; |
||
22 | |||
23 | /** |
||
24 | * Override default Claim validation. |
||
25 | * |
||
26 | * Uses reference time of the validation context as a constraint. |
||
27 | * |
||
28 | * @see \Sop\JWX\JWT\Claim\Claim::validateWithContext() |
||
29 | * |
||
30 | * @param ValidationContext $ctx |
||
31 | * |
||
32 | * @return bool |
||
33 | */ |
||
34 | 17 | public function validateWithContext(ValidationContext $ctx): bool |
|
50 |