| Conditions | 4 |
| Paths | 6 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | public function withoutTrashed() |
||
| 22 | { |
||
| 23 | $guards = []; |
||
| 24 | $hasGuard = false; |
||
| 25 | foreach ($this->guards as $k => $v) { |
||
| 26 | if ($v === $this->deletedAtColumn . ' IS NULL') { |
||
| 27 | $hasGuard = true; |
||
| 28 | break; |
||
| 29 | } |
||
| 30 | } |
||
| 31 | |||
| 32 | if (!$hasGuard) { |
||
| 33 | $this->guards[] = $this->deletedAtColumn . ' IS NULL'; |
||
| 34 | } |
||
| 35 | |||
| 36 | return $this; |
||
| 37 | } |
||
| 47 |