Total Complexity | 6 |
Total Lines | 64 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
5 | trait EloquentHooks |
||
6 | { |
||
7 | /** |
||
8 | * @param mixed ...$model |
||
9 | * @return YouShouldHave |
||
|
|||
10 | */ |
||
11 | public function whenYouFetch(...$model) |
||
12 | { |
||
13 | $model = $this->normalizeModel('retrieved', $model); |
||
14 | return $this->authorize($model); |
||
15 | } |
||
16 | |||
17 | /** |
||
18 | * @param mixed ...$model |
||
19 | * @return YouShouldHave |
||
20 | */ |
||
21 | public function whenYouCreate(...$model) |
||
22 | { |
||
23 | $model = $this->normalizeModel('creating', $model); |
||
24 | return $this->authorize($model); |
||
25 | } |
||
26 | |||
27 | /** |
||
28 | * @param mixed ...$model |
||
29 | * @return YouShouldHave |
||
30 | */ |
||
31 | public function whenYouUpdate(...$model) |
||
32 | { |
||
33 | $model = $this->normalizeModel('updating', $model); |
||
34 | return $this->authorize($model); |
||
35 | } |
||
36 | |||
37 | /** |
||
38 | * @param mixed ...$model |
||
39 | * @return YouShouldHave |
||
40 | */ |
||
41 | public function whenYouSave(...$model) |
||
45 | } |
||
46 | |||
47 | /** |
||
48 | * @param mixed ...$model |
||
49 | * @return YouShouldHave |
||
50 | */ |
||
51 | public function whenYouDelete(...$model) |
||
52 | { |
||
53 | $model = $this->normalizeModel('deleting', $model); |
||
54 | return $this->authorize($model); |
||
55 | } |
||
56 | /** |
||
57 | * @param $target |
||
58 | * @param $model |
||
59 | * @return array |
||
60 | */ |
||
61 | private function normalizeModel($target, array $model): array |
||
69 | } |
||
70 | } |
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