1 | <?php |
||
29 | abstract class AbstractDomainEvent implements DomainEventInterface |
||
30 | { |
||
31 | /** @var DateTime */ |
||
32 | private $occurredOn; |
||
33 | |||
34 | /** @var int */ |
||
35 | private $version; |
||
36 | |||
37 | /** |
||
38 | * AbstractDomainEvent constructor. |
||
39 | * |
||
40 | * @param DateTime $occurredOn |
||
|
|||
41 | * @param int $sequenceId |
||
42 | */ |
||
43 | 34 | public function __construct(DateTime $occurredOn = null, $sequenceId = null) |
|
51 | |||
52 | /** |
||
53 | * @inheritdoc |
||
54 | */ |
||
55 | 5 | final public function getOccurredOn() |
|
59 | |||
60 | /** |
||
61 | * @return int |
||
62 | */ |
||
63 | 4 | public function getVersion() |
|
67 | |||
68 | /** |
||
69 | * @inheritdoc |
||
70 | */ |
||
71 | 3 | final public function getPayload() { |
|
77 | |||
78 | /** |
||
79 | * Custom getPayload fields, to be merged with default getPayload. |
||
80 | * |
||
81 | * @return array |
||
82 | */ |
||
83 | abstract protected function getAdditionalPayload(); |
||
84 | } |
||
85 |
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.