1 | <?php |
||
33 | class CollectionEvent extends AbstractDomainEvent |
||
34 | { |
||
35 | /** |
||
36 | * @var CollectionInterface |
||
37 | */ |
||
38 | private $collection; |
||
39 | |||
40 | /** |
||
41 | * @var OptionsInterface |
||
42 | */ |
||
43 | private $options; |
||
44 | |||
45 | /** |
||
46 | * @var DeltaInterface |
||
47 | */ |
||
48 | private $target; |
||
49 | |||
50 | /** |
||
51 | * CollectionEvent constructor. |
||
52 | * |
||
53 | * @param DeltaInterface $target |
||
54 | * @param OptionsInterface $options |
||
55 | * @param CollectionInterface $collection |
||
56 | * @param DateTime $createdOn |
||
|
|||
57 | */ |
||
58 | 23 | public function __construct( |
|
59 | DeltaInterface $target, |
||
60 | OptionsInterface $options, |
||
61 | CollectionInterface $collection, |
||
62 | DateTime $createdOn = null |
||
63 | ) { |
||
64 | 23 | $this->options = $options; |
|
65 | 23 | $this->target = $target; |
|
66 | 23 | $this->collection = $collection; |
|
67 | 23 | parent::__construct($createdOn); |
|
68 | 23 | } |
|
69 | |||
70 | /** |
||
71 | * @return OptionsInterface |
||
72 | */ |
||
73 | 2 | final public function getOptions() |
|
77 | |||
78 | /** |
||
79 | * @return CollectionInterface |
||
80 | */ |
||
81 | 3 | final public function getCollection() |
|
85 | |||
86 | /** |
||
87 | * @return DeltaInterface |
||
88 | */ |
||
89 | 2 | final public function getTarget() |
|
93 | |||
94 | /** |
||
95 | * Returns the event getPayload |
||
96 | * |
||
97 | * @return array |
||
98 | */ |
||
99 | 1 | protected function getAdditionalPayload() |
|
107 | } |
||
108 |
This check looks for
@param
annotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.