| Total Complexity | 4 |
| Total Lines | 45 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | class TestToken implements TokenInterface |
||
| 17 | { |
||
| 18 | /** @var string */ |
||
| 19 | private $id; |
||
| 20 | |||
| 21 | /** @var \DateTimeInterface|null */ |
||
| 22 | private $expiresAt; |
||
| 23 | |||
| 24 | /** @var array */ |
||
| 25 | private $payload; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @param string $id |
||
| 29 | * @param array $payload |
||
| 30 | * @param \DateTimeInterface|null $expiresAt |
||
| 31 | */ |
||
| 32 | public function __construct(string $id, array $payload, \DateTimeInterface $expiresAt = null) |
||
| 33 | { |
||
| 34 | $this->id = $id; |
||
| 35 | $this->expiresAt = $expiresAt; |
||
| 36 | $this->payload = $payload; |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @inheritDoc |
||
| 41 | */ |
||
| 42 | public function getID(): string |
||
| 43 | { |
||
| 44 | return $this->id; |
||
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * @inheritDoc |
||
| 49 | */ |
||
| 50 | public function getExpiresAt(): ?\DateTimeInterface |
||
| 53 | } |
||
| 54 | |||
| 55 | /** |
||
| 56 | * @inheritDoc |
||
| 57 | */ |
||
| 58 | public function getPayload(): array |
||
| 63 |