| Conditions | 1 | 
| Paths | 1 | 
| Total Lines | 8 | 
| Code Lines | 4 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 5 | 
| CRAP Score | 1 | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php  | 
            ||
| 19 | 2 | public function handle(HasAsset $model, $replace, $with)  | 
            |
| 20 |     { | 
            ||
| 21 | 2 | $old = $model->assetRelation()->findOrFail($replace);  | 
            |
| 
                                                                                                    
                        
                         | 
                |||
| 22 | |||
| 23 | 2 | $model->assetRelation()->detach($old->id);  | 
            |
| 24 | 2 | $old->delete();  | 
            |
| 25 | |||
| 26 | 2 | app(AddAsset::class)->add($model, Asset::findOrFail($with), $old->pivot->type, $old->pivot->locale);  | 
            |
| 27 | 2 | }  | 
            |
| 29 |