Total Complexity | 10 |
Total Lines | 78 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
5 | class BaseService |
||
6 | { |
||
7 | /** |
||
8 | * Find a model item |
||
9 | * @param integer $id |
||
10 | * @return object|null |
||
11 | */ |
||
12 | public function find($id) |
||
15 | } |
||
16 | |||
17 | /** |
||
18 | * Select all model items |
||
19 | * @return object|null |
||
20 | */ |
||
21 | public function selectAll() |
||
22 | { |
||
23 | return $this->repo->selectAll(); |
||
24 | } |
||
25 | |||
26 | /** |
||
27 | * Get model |
||
28 | * @return return object |
||
|
|||
29 | */ |
||
30 | public function getModel() |
||
31 | { |
||
32 | return $this->repo->getModel(); |
||
33 | } |
||
34 | |||
35 | /** |
||
36 | * update or add model |
||
37 | * @param object $model |
||
38 | * @param array $attributes |
||
39 | * @return object |
||
40 | */ |
||
41 | public function updateOrAddModel($model, $attributes) |
||
42 | { |
||
43 | if (count($attributes) > 0) { |
||
44 | $model->fill($attributes); |
||
45 | $model->save(); |
||
46 | } |
||
47 | return $model; |
||
48 | } |
||
49 | |||
50 | /** |
||
51 | * destroy model |
||
52 | * @param integer $id |
||
53 | * @return object |
||
54 | */ |
||
55 | public function destroy($id) |
||
59 | } |
||
60 | |||
61 | /** |
||
62 | * Notifications and redirect |
||
63 | * @param string $routeName |
||
64 | * @param object $result |
||
65 | * @param string $successMsg |
||
66 | * @return mixed |
||
67 | */ |
||
68 | public function notificationRedirect($routeName, $result, $successMsg) |
||
83 | } |
||
84 | } |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths