Restorable   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 10
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A restore() 0 3 1
1
<?php
2
3
namespace OkayBueno\Repositories\src\Traits;
4
5
/**
6
 * Class Restorable
7
 * @package OkayBueno\Repositories\Traits
8
 */
9
trait Restorable
10
{
11
12
    /**
13
     * @param $value
14
     * @param string $field
15
     */
16
    public function restore( $value, $field = 'id' )
17
    {
18
        $this->model->where( $field, $value )->restore();
19
    }
20
}