Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
23 | public function __construct(string $encryptedTime) |
||
24 | { |
||
25 | $this->encryptedTime = $encryptedTime; |
||
26 | |||
27 | $timestamp = app('encrypter')->decrypt($encryptedTime); |
||
28 | |||
29 | if (! $this->isValidTimeStamp($timestamp)) { |
||
30 | throw new \Exception(sprintf('Timestamp %s is invalid', $timestamp)); |
||
31 | } |
||
32 | |||
33 | $this->carbon = Date::createFromTimestamp($timestamp); |
||
34 | } |
||
35 | |||
53 |