| Conditions | 3 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | public function validate( |
||
| 23 | SubjectConfirmation $subjectConfirmation, |
||
| 24 | Result $result, |
||
| 25 | ): void { |
||
| 26 | $data = $subjectConfirmation->getSubjectConfirmationData(); |
||
| 27 | Assert::notNull($data); |
||
| 28 | |||
| 29 | /** @psalm-suppress PossiblyNullReference */ |
||
| 30 | $notBefore = $data->getNotBefore(); |
||
| 31 | $clock = Utils::getContainer()->getClock(); |
||
| 32 | if ($notBefore !== null && $notBefore > ($clock->now()->add(new DateInterval('PT60S')))) { |
||
| 33 | $result->addError('NotBefore in SubjectConfirmationData is in the future'); |
||
| 34 | } |
||
| 37 |