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