| 1 | <?php |
||
| 7 | class FakeAggregateRoot |
||
| 8 | { |
||
| 9 | /** @var \Spatie\EventProjector\AggregateRoot */ |
||
| 10 | private $aggregateRoot; |
||
| 11 | |||
| 12 | public function __construct(AggregateRoot $aggregateRoot) |
||
| 16 | |||
| 17 | public function given(array $events) |
||
| 27 | |||
| 28 | public function when($callable) |
||
| 34 | |||
| 35 | public function assertNothingRecorded() |
||
| 41 | |||
| 42 | public function assertRecorded(array $expectedEvents): void |
||
| 46 | |||
| 47 | public function __call($name, $arguments) |
||
| 53 | } |
||
| 54 | |||
| 55 |
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: