| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 33 | public function getInvite(Tournament $tournament) |
||
| 34 | { |
||
| 35 | if ($this->invite != 0) |
||
| 36 | return Invite::findOrFail($this->invite); |
||
| 37 | |||
| 38 | return Invite::where('code', 'open') |
||
| 39 | ->where('email', Auth::user()->email) |
||
| 40 | ->where('object_type', 'App\Tournament') |
||
| 41 | ->where('object_id', $tournament->id) |
||
| 42 | ->get(); |
||
| 43 | } |
||
| 45 |