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