@@ -268,8 +268,8 @@ public static function fromCachedConfig(
268268 EventStore $ eventStore ,
269269 LogEngine $ logEngine ,
270270 ContainerInterface $ container ,
271- DocumentStore $ documentStore = null ,
272- MessageProducer $ eventQueue = null
271+ ? DocumentStore $ documentStore = null ,
272+ ? MessageProducer $ eventQueue = null
273273 ): self {
274274 $ self = new self ($ schema );
275275
@@ -472,7 +472,7 @@ public function registerEvent(string $eventName, PayloadSchema $schema): self
472472 return $ this ;
473473 }
474474
475- public function registerQuery (string $ queryName , PayloadSchema $ payloadSchema = null ): QueryDescription
475+ public function registerQuery (string $ queryName , ? PayloadSchema $ payloadSchema = null ): QueryDescription
476476 {
477477 $ this ->assertNotInitialized (__METHOD__ );
478478
@@ -511,12 +511,12 @@ public function registerProjection(string $projectionName, ProjectionDescription
511511 $ this ->projectionMap [$ projectionName ] = $ projectionDescription ;
512512 }
513513
514- public function registerType (string $ nameOrImmutableRecordClass , ResponseTypeSchema $ schema = null ): void
514+ public function registerType (string $ nameOrImmutableRecordClass , ? ResponseTypeSchema $ schema = null ): void
515515 {
516516 $ this ->registerResponseType ($ nameOrImmutableRecordClass , $ schema );
517517 }
518518
519- public function registerResponseType (string $ nameOrImmutableRecordClass , ResponseTypeSchema $ schema = null ): void
519+ public function registerResponseType (string $ nameOrImmutableRecordClass , ? ResponseTypeSchema $ schema = null ): void
520520 {
521521 $ this ->assertNotInitialized (__METHOD__ );
522522
@@ -543,7 +543,7 @@ public function registerResponseType(string $nameOrImmutableRecordClass, Respons
543543 $ this ->typeSchemaMap ->add ($ name , $ schema );
544544 }
545545
546- public function registerInputType (string $ nameOrImmutableRecordClass , InputTypeSchema $ schema = null ): void
546+ public function registerInputType (string $ nameOrImmutableRecordClass , ? InputTypeSchema $ schema = null ): void
547547 {
548548 $ this ->assertNotInitialized (__METHOD__ );
549549
@@ -740,8 +740,8 @@ public function initialize(
740740 EventStore $ eventStore ,
741741 LogEngine $ logEngine ,
742742 ContainerInterface $ container ,
743- DocumentStore $ documentStore = null ,
744- MessageProducer $ eventQueue = null
743+ ? DocumentStore $ documentStore = null ,
744+ ? MessageProducer $ eventQueue = null
745745 ): self {
746746 $ this ->assertNotInitialized (__METHOD__ );
747747
@@ -1020,7 +1020,7 @@ public function rebuildAggregateState(string $aggregateType, string $aggregateId
10201020 }
10211021 }
10221022
1023- public function loadAggregateState (string $ aggregateType , string $ aggregateId , int $ expectedVersion = null )
1023+ public function loadAggregateState (string $ aggregateType , string $ aggregateId , ? int $ expectedVersion = null )
10241024 {
10251025 $ this ->assertBootstrapped (__METHOD__ );
10261026
@@ -1050,7 +1050,7 @@ public function loadAggregateEvents(
10501050 string $ aggregateType ,
10511051 string $ aggregateId ,
10521052 int $ minVersion = 1 ,
1053- int $ maxVersion = null
1053+ ? int $ maxVersion = null
10541054 ): \Iterator
10551055 {
10561056 $ this ->assertBootstrapped (__METHOD__ );
@@ -1075,7 +1075,7 @@ public function loadAggregateEvents(
10751075 }
10761076
10771077
1078- public function loadAggregateStateUntil (string $ aggregateType , string $ aggregateId , int $ maxVersion = null )
1078+ public function loadAggregateStateUntil (string $ aggregateType , string $ aggregateId , ? int $ maxVersion = null )
10791079 {
10801080 $ this ->assertBootstrapped (__METHOD__ );
10811081
@@ -1090,7 +1090,7 @@ public function loadAggregateStateUntil(string $aggregateType, string $aggregate
10901090 return $ aggregate ->currentState ();
10911091 }
10921092
1093- private function loadAggregateRoot (string $ aggregateType , string $ aggregateId , int $ expectedVersion = null , bool $ forceReplay = false )
1093+ private function loadAggregateRoot (string $ aggregateType , string $ aggregateId , ? int $ expectedVersion = null , bool $ forceReplay = false )
10941094 {
10951095 $ aggregateDesc = $ this ->aggregateDescriptions [$ aggregateType ];
10961096
@@ -1135,7 +1135,7 @@ private function loadAggregateRoot(string $aggregateType, string $aggregateId, i
11351135 * @param int $maxVersion
11361136 * @return FlavouredAggregateRoot
11371137 */
1138- private function loadAggregateRootUntil (string $ aggregateType , string $ aggregateId , int $ maxVersion = null ): FlavouredAggregateRoot
1138+ private function loadAggregateRootUntil (string $ aggregateType , string $ aggregateId , ? int $ maxVersion = null ): FlavouredAggregateRoot
11391139 {
11401140 $ aggregateDesc = $ this ->aggregateDescriptions [$ aggregateType ];
11411141
@@ -1330,7 +1330,7 @@ public function cacheAggregateState(string $aggregateType, string $aggregateId,
13301330 * @param int|null $expectedVersion
13311331 * @return null|mixed Null is returned if no state is cached, otherwise the cached process state
13321332 */
1333- public function loadAggregateStateFromCache (string $ aggregateType , string $ aggregateId , int $ expectedVersion = null )
1333+ public function loadAggregateStateFromCache (string $ aggregateType , string $ aggregateId , ? int $ expectedVersion = null )
13341334 {
13351335 $ cache = $ this ->aggregateCache [$ aggregateType ][$ aggregateId ] ?? null ;
13361336 if (!$ cache ) {
0 commit comments