Total Complexity | 5 |
Total Lines | 46 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
5 | trait Switchable |
||
6 | { |
||
7 | protected function switchableFields() |
||
11 | ]; |
||
12 | } |
||
13 | |||
14 | /** |
||
15 | * Switch the current resource on. |
||
16 | * |
||
17 | * @param \Illuminate\Database\Eloquent\Model $entity |
||
18 | * @param string $fieldName |
||
19 | * @return |
||
20 | */ |
||
21 | public function switchOn($entity, $fieldName) |
||
31 | ]); |
||
32 | } |
||
33 | |||
34 | /** |
||
35 | * Switch the current resource off. |
||
36 | * |
||
37 | * @param \Illuminate\Database\Eloquent\Model $entity |
||
38 | * @param string $fieldName |
||
39 | * @return |
||
40 | */ |
||
41 | public function switchOff($entity, $fieldName) |
||
54 |