Total Complexity | 6 |
Total Lines | 57 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
8 | class EloquentSituations extends BaseSituation |
||
9 | { |
||
10 | /** |
||
11 | * @param mixed ...$model |
||
12 | * |
||
13 | * @return YouShouldHave |
||
14 | */ |
||
15 | public function whenYouFetch(...$model) |
||
16 | { |
||
17 | return $this->watchModel('retrieved', $this->normalizeInput($model)); |
||
18 | } |
||
19 | |||
20 | /** |
||
21 | * @param mixed ...$model |
||
22 | * |
||
23 | * @return YouShouldHave |
||
24 | */ |
||
25 | public function whenYouCreate(...$model) |
||
26 | { |
||
27 | return $this->watchModel('creating', $this->normalizeInput($model)); |
||
28 | } |
||
29 | |||
30 | /** |
||
31 | * @param mixed ...$model |
||
32 | * |
||
33 | * @return YouShouldHave |
||
34 | */ |
||
35 | public function whenYouUpdate(...$model) |
||
36 | { |
||
37 | return $this->watchModel('updating', $this->normalizeInput($model)); |
||
38 | } |
||
39 | |||
40 | /** |
||
41 | * @param mixed ...$model |
||
42 | * |
||
43 | * @return YouShouldHave |
||
44 | */ |
||
45 | public function whenYouSave(...$model) |
||
46 | { |
||
47 | return $this->watchModel('saving', $this->normalizeInput($model)); |
||
48 | } |
||
49 | |||
50 | /** |
||
51 | * @param mixed ...$model |
||
52 | * |
||
53 | * @return YouShouldHave |
||
54 | */ |
||
55 | public function whenYouDelete(...$model) |
||
56 | { |
||
57 | return $this->watchModel('deleting', $this->normalizeInput($model)); |
||
58 | } |
||
59 | |||
60 | private function watchModel($event, $modelClass) |
||
65 | } |
||
66 | } |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..