1 | <?php |
||
29 | abstract class AbstractDomainEvent implements DomainEventInterface |
||
30 | { |
||
31 | /** @var DateTime */ |
||
32 | private $occurredOn; |
||
33 | |||
34 | /** |
||
35 | * AbstractDomainEvent constructor. |
||
36 | * |
||
37 | * @param DateTime $createdOn |
||
|
|||
38 | */ |
||
39 | 33 | public function __construct(DateTime $createdOn = null) |
|
47 | |||
48 | /** |
||
49 | * @inheritdoc |
||
50 | */ |
||
51 | 5 | final public function getOccurredOn() |
|
55 | |||
56 | /** |
||
57 | * @inheritdoc |
||
58 | */ |
||
59 | 3 | final public function getPayload() { |
|
64 | |||
65 | /** |
||
66 | * @inheritdoc |
||
67 | */ |
||
68 | 1 | public function getEventVersion() |
|
72 | |||
73 | /** |
||
74 | * Custom getPayload fields, to be merged with default getPayload. |
||
75 | * |
||
76 | * @return array |
||
77 | */ |
||
78 | abstract protected function getAdditionalPayload(); |
||
79 | } |
||
80 |
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.