Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
27 | public function __construct(callable $sign, $ttl = 1440) |
||
28 | { |
||
29 | if (!is_int($ttl)) { |
||
30 | throw new \InvalidArgumentException('ttl is not an integer'); |
||
31 | } |
||
32 | |||
33 | if ($ttl <= 0) { |
||
34 | throw new \InvalidArgumentException('ttl is non-positive'); |
||
35 | } |
||
36 | |||
37 | $this->sign = $sign; |
||
38 | $this->ttl = $ttl; |
||
39 | $this->base64url = new Base64Url(); |
||
40 | } |
||
41 | |||
86 |