1 | <?php |
||
11 | class InMemoryEventStore extends AbstractEventStore |
||
12 | { |
||
13 | /** |
||
14 | * @var StoredEventStream[] |
||
15 | */ |
||
16 | private $streams; |
||
17 | |||
18 | /** |
||
19 | * @param SerializerInterface $serializer |
||
20 | * @param EventUpgrader $eventUpgrader |
||
21 | * @param StoredEventStream[] $streams |
||
22 | */ |
||
23 | 29 | public function __construct( |
|
31 | |||
32 | /** |
||
33 | * @param string $streamId |
||
34 | * @param StoredEvent[] $storedEvents |
||
35 | * @param int $expectedVersion |
||
36 | */ |
||
37 | 13 | protected function appendStoredEvents($streamId, $storedEvents, $expectedVersion) |
|
45 | |||
46 | /** |
||
47 | * @param string $streamId |
||
48 | * @return EventStreamInterface |
||
49 | */ |
||
50 | 18 | public function readFullStream($streamId) |
|
60 | |||
61 | /** |
||
62 | * @param string $streamId |
||
63 | * @param int $start |
||
64 | * @param int $count |
||
65 | * @return EventStreamInterface |
||
66 | */ |
||
67 | 4 | public function readStreamEventsForward($streamId, $start = 1, $count = null) |
|
82 | |||
83 | /** |
||
84 | * @return EventStreamInterface[] |
||
85 | */ |
||
86 | 2 | public function readAllStreams() |
|
94 | |||
95 | /** |
||
96 | * @return EventStreamInterface |
||
97 | */ |
||
98 | 1 | public function readAllEvents() |
|
107 | |||
108 | /** |
||
109 | * @param string $streamId |
||
110 | * @return int |
||
111 | */ |
||
112 | 4 | protected function streamVersion($streamId) |
|
117 | |||
118 | /** |
||
119 | * @param string $type |
||
120 | * @param Version $version |
||
121 | * @return EventStreamInterface |
||
122 | */ |
||
123 | 1 | protected function readStoredEventsOfTypeAndVersion($type, $version) |
|
136 | |||
137 | /** |
||
138 | * @param string $streamId |
||
139 | * @return bool |
||
140 | */ |
||
141 | 28 | protected function streamExists($streamId) |
|
145 | } |
||
146 |
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: