Conditions | 1 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 8 |
Lines | 11 |
Ratio | 100 % |
Changes | 1 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
44 | View Code Duplication | protected function trigger(Owner &$owner, $action) |
|
45 | { |
||
46 | $data = [ |
||
47 | 'target_type' => 'Owner', |
||
48 | 'target_id' => $owner->id, |
||
49 | 'action' => $action, |
||
50 | 'author_id' => $owner->user_id, |
||
51 | 'project_id' => 0, |
||
52 | ]; |
||
53 | $moment = Moment::create($data); |
||
54 | } |
||
55 | } |
||
56 |
If you access a property on an interface, you most likely code against a concrete implementation of the interface.
Available Fixes
Adding an additional type check:
Changing the type hint: