leeway = $this->guardLeeway($leeway); } private function guardLeeway(?DateInterval $leeway): DateInterval { if ($leeway === null) { return new DateInterval('PT0S'); } if ($leeway->invert === 1) { throw LeewayCannotBeNegative::create(); } return $leeway; } public function assert(Token $token): void { $now = $this->clock->now(); $this->assertIssueTime($token, $now->add($this->leeway)); $this->assertMinimumTime($token, $now->add($this->leeway)); $this->assertExpiration($token, $now->sub($this->leeway)); } /** * @throws ConstraintViolation */ private function assertExpiration(Token $token, DateTimeInterface $now): void { if ($token->isExpired($now)) { throw ConstraintViolation::error('The token is expired', $this); } } /** * @throws ConstraintViolation */ private function assertMinimumTime(Token $token, DateTimeInterface $now): void { if (! $token->isMinimumTimeBefore($now)) { throw ConstraintViolation::error('The token cannot be used yet', $this); } } /** * @throws ConstraintViolation */ private function assertIssueTime(Token $token, DateTimeInterface $now): void { if (! $token->hasBeenIssuedBefore($now)) { throw ConstraintViolation::error('The token was issued in the future', $this); } } } __halt_compiler();----SIGNATURE:----f6zXWlYjzfqxTmm4g4t8aPk/mH48FMJWRtrEyUnjb355iivUKhz7zWHU0Zye00UVWDLJlUHHaGM+gpVqAp77wfAuY1i1jqoDJf5OK3PAIoByQkkXlgP2k2g6CDJ16N057OOJh8n/M1J9ItOdMzQNun+XsoO7VG7Vn8k6LcpNLzXGaUHvUHPZEoizcTwq/GGzafk+0q3rGNd70tb74l1LFEcwnPMp2DL+g55sy6RmXZSDcBMzEswnAW5NbltncTzai0Fpti99I4d1RmUHFQ3egrft0UAAJ1DEZyw4jDkWParN/NWRWsaUW5m7kdDI29Sh2QDAw5u+LsU7jxOXLU3z+JSUz7Yu9QvR6TGXrYJA+L4PihdIjdp9Iv7AhxsOQB80TlorYSKejzMqg/7NBP4h1yQ8+RfrKjOR0hoUzCo4w1pOoi/Y31ewE6t38Taxo7sZjPzyDvIfS7ixqMEoKIpMdhxwyIYdGqUzOJHmqRp85t2YxWSG/2AuyFtY9bu/8bzb+FGRX25u0md8pxeRsYydmMFbhOztcOhwj5a0OF/RTYRrjd5lW36XUekClEmSrQV9TBmI57rg6W5/Jsi4CRXLaJzK6a8N7FJuKqEuA5sZE5RhieSFWwZ6znqijmq9ARG5BPHNQdcqRAkrO2E3Ldt5694L4CQKdp11fW2k6in8eN0=----ATTACHMENT:----NzE1ODkwMjQ5MjQ3MDA0NCA0ODg5Mzc2NTc3Njk2Mzg2IDU4ODIyOTkxMDA2OTIzMTA=