Total Complexity | 3 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
14 | trait UpdatesEntity |
||
15 | { |
||
16 | /** |
||
17 | * Finds a model with ID and updates it with given properties. |
||
18 | * |
||
19 | * @param int|string $modelId |
||
20 | * @param mixed $properties |
||
21 | * |
||
22 | * @return Builder|Model |
||
23 | */ |
||
24 | public function findAndUpdate($modelId, $properties) |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * Updates a model given properties. |
||
33 | * |
||
34 | * @param Model $model |
||
35 | * @param mixed $properties |
||
36 | * |
||
37 | * @return Builder|Model |
||
38 | */ |
||
39 | public function update($model, $properties) |
||
50 |