| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | 32 | public function scopeBetweenUsers($query, $sender, $recipient) |
|
| 27 | { |
||
| 28 | $query->where(function ($queryIn) use ($sender, $recipient) { |
||
| 29 | $queryIn->where(function ($q) use ($sender, $recipient) { |
||
| 30 | 32 | $q->whereSender($sender)->whereRecipient($recipient); |
|
| 31 | })->orWhere(function ($q) use ($sender, $recipient) { |
||
| 32 | 32 | $q->whereSender($recipient)->whereRecipient($sender); |
|
| 33 | 32 | }); |
|
| 34 | 32 | }); |
|
| 35 | 32 | } |
|
| 36 | } |
||
| 37 |