| Total Complexity | 3 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class Invitation |
||
| 10 | { |
||
| 11 | private $organizationId; |
||
| 12 | private $email; |
||
| 13 | private $firstname; |
||
| 14 | private $lastname; |
||
| 15 | private $token; |
||
| 16 | private $hash; |
||
| 17 | |||
| 18 | public function __construct(string $organizationId, string $email, ?string $firstname = null, ?string $lastname = null) |
||
| 19 | { |
||
| 20 | $this->organizationId = $organizationId; |
||
| 21 | $this->email = $email; |
||
| 22 | $this->firstname = $firstname; |
||
| 23 | $this->lastname = $lastname; |
||
| 24 | $this->token = base64_encode($organizationId.'|*|'.$email.'|*|'.$firstname.'|*|'.$lastname); |
||
| 25 | $this->hash = app(HashGen::class)->hash($this->token); |
||
| 26 | } |
||
| 27 | |||
| 28 | public function hash():string |
||
| 31 | } |
||
| 32 | |||
| 33 | public function data():array |
||
| 43 |