1 | <?php namespace Anomaly\Streams\Platform\Assignment; |
||
17 | class AssignmentObserver extends Observer |
||
18 | { |
||
19 | |||
20 | /** |
||
21 | * Fired before creating an assignment. |
||
22 | * |
||
23 | * @param AssignmentInterface|AssignmentModel $model |
||
24 | */ |
||
25 | public function creating(AssignmentInterface $model) |
||
29 | |||
30 | /** |
||
31 | * Run after a record is created. |
||
32 | * |
||
33 | * @param AssignmentInterface $model |
||
34 | */ |
||
35 | public function created(AssignmentInterface $model) |
||
44 | |||
45 | /** |
||
46 | * Run before a record is updated. |
||
47 | * |
||
48 | * @param AssignmentInterface $model |
||
49 | */ |
||
50 | public function updating(AssignmentInterface $model) |
||
56 | |||
57 | /** |
||
58 | * Run after a record is updated. |
||
59 | * |
||
60 | * @param AssignmentInterface $model |
||
61 | */ |
||
62 | public function updated(AssignmentInterface $model) |
||
71 | |||
72 | /** |
||
73 | * Run after saving a record. |
||
74 | * |
||
75 | * @param AssignmentInterface $model |
||
76 | */ |
||
77 | public function saved(AssignmentInterface $model) |
||
84 | |||
85 | /** |
||
86 | * Run after a record has been deleted. |
||
87 | * |
||
88 | * @param AssignmentInterface $model |
||
89 | */ |
||
90 | public function deleted(AssignmentInterface $model) |
||
100 | } |
||
101 |
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: