1 | <?php |
||
26 | trait AggregateEventBehaviour |
||
27 | { |
||
28 | use AggregateBehaviour { |
||
29 | AggregateBehaviour::getIdentity as private; |
||
30 | AggregateBehaviour::getVersion as private; |
||
31 | } |
||
32 | |||
33 | /** |
||
34 | * @var \DateTimeImmutable |
||
35 | */ |
||
36 | private $createdAt; |
||
37 | |||
38 | /** |
||
39 | * {@inheritdoc} |
||
40 | */ |
||
41 | final public function getAggregateId(): Identity |
||
45 | |||
46 | /** |
||
47 | * {@inheritdoc} |
||
48 | */ |
||
49 | final public function getAggregateVersion(): AggregateVersion |
||
53 | |||
54 | /** |
||
55 | * {@inheritdoc} |
||
56 | */ |
||
57 | final public function withAggregateVersion(AggregateVersion $aggregateVersion) |
||
80 | |||
81 | /** |
||
82 | * {@inheritdoc} |
||
83 | */ |
||
84 | final public function getCreatedAt(): \DateTimeImmutable |
||
88 | } |
||
89 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: