Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
26 | public function getByHash(string $hash): ?Invitation |
||
27 | { |
||
28 | $record = DB::table('invitations') |
||
29 | ->select() |
||
30 | ->where('hash', $hash) |
||
31 | ->first(); |
||
32 | if(!isset($record)){ |
||
33 | return null; |
||
34 | } |
||
35 | return new Invitation($record->organization_id, $record->email, $record->firstname, $record->lastname); |
||
36 | } |
||
38 |