| Total Complexity | 4 | 
| Total Lines | 34 | 
| Duplicated Lines | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php  | 
            ||
| 5 | trait SoftDeletesRepository  | 
            ||
| 6 | { | 
            ||
| 7 | /**  | 
            ||
| 8 | * @param int $id  | 
            ||
| 9 | *  | 
            ||
| 10 | * @return bool  | 
            ||
| 11 | */  | 
            ||
| 12 | public function restore(int $id): bool  | 
            ||
| 13 |     { | 
            ||
| 14 |         return $this->getNewBuilderWithScope()->where('id', $id)->restore(); | 
            ||
| 
                                                                                                    
                        
                         | 
                |||
| 15 | }  | 
            ||
| 16 | |||
| 17 | /**  | 
            ||
| 18 | * @param int $id  | 
            ||
| 19 | *  | 
            ||
| 20 | * @return bool  | 
            ||
| 21 | */  | 
            ||
| 22 | public function forceDelete(int $id): bool  | 
            ||
| 23 |     { | 
            ||
| 24 |         return $this->getNewBuilderWithScope()->where('id', $id)->forceDelete(); | 
            ||
| 25 | }  | 
            ||
| 26 | |||
| 27 | public function onlyTrash(): self  | 
            ||
| 28 |     { | 
            ||
| 29 | $this->scope(fn (Builder $builder) => $builder->onlyTrash());  | 
            ||
| 30 | |||
| 31 | return $this;  | 
            ||
| 32 | }  | 
            ||
| 33 | |||
| 34 | public function withTrash(): self  | 
            ||
| 39 | }  | 
            ||
| 40 | }  | 
            ||
| 41 |