Skip to content

Commit ca6ac8b

Browse files
committed
phpstan
1 parent b95310d commit ca6ac8b

File tree

2 files changed

+3
-18
lines changed

2 files changed

+3
-18
lines changed

packages/Ecotone/src/Modelling/AggregateFlow/SaveAggregate/SaveAggregateServiceBuilder.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,23 +45,18 @@ class SaveAggregateServiceBuilder implements CompilableBuilder
4545
private ?string $calledAggregateClassName = null;
4646

4747
private function __construct(
48-
ClassDefinition $aggregateClassDefinition,
49-
InterfaceToCallRegistry $interfaceToCallRegistry,
5048
private BaseEventSourcingConfiguration $eventSourcingConfiguration,
5149
private bool $publishEvents = true,
52-
private bool $passThroughResult = false,
5350
) {
5451
}
5552

5653
/**
5754
* @param string[] $aggregateClasses
5855
*/
5956
public static function create(
60-
ClassDefinition $aggregateClassDefinition,
61-
InterfaceToCallRegistry $interfaceToCallRegistry,
6257
BaseEventSourcingConfiguration $eventSourcingConfiguration,
6358
): self {
64-
return new self($aggregateClassDefinition, $interfaceToCallRegistry, $eventSourcingConfiguration);
59+
return new self($eventSourcingConfiguration);
6560
}
6661

6762
/**

packages/Ecotone/src/Modelling/Config/AggregrateHandlerModule.php

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -293,8 +293,6 @@ private function registerAggregateCommandHandler(Configuration $configuration, I
293293

294294
$serviceActivatorHandler->chain(
295295
SaveAggregateServiceBuilder::create(
296-
$aggregateClassDefinition,
297-
$interfaceToCallRegistry,
298296
$baseEventSourcingConfiguration
299297
)
300298
->withAggregateRepositoryFactories($aggregateRepositoryReferenceNames)
@@ -483,11 +481,7 @@ public function registerForDirectLoadAndSaveOfAggregate(InterfaceToCallRegistry
483481
MessageProcessorActivatorBuilder::create()
484482
->withInputChannelName(self::getRegisterAggregateSaveRepositoryInputChannel($aggregateClass))
485483
->chain(
486-
SaveAggregateServiceBuilder::create(
487-
$aggregateClassDefinition,
488-
$interfaceToCallRegistry,
489-
$baseEventSourcingConfiguration
490-
)
484+
SaveAggregateServiceBuilder::create($baseEventSourcingConfiguration)
491485
->withAggregateRepositoryFactories($this->aggregateRepositoryReferenceNames)
492486
)
493487
);
@@ -497,11 +491,7 @@ public function registerForDirectLoadAndSaveOfAggregate(InterfaceToCallRegistry
497491
MessageProcessorActivatorBuilder::create()
498492
->withInputChannelName(self::getRegisterAggregateSaveRepositoryInputChannel($aggregateClass) . '.test_setup_state')
499493
->chain(
500-
SaveAggregateServiceBuilder::create(
501-
$aggregateClassDefinition,
502-
$interfaceToCallRegistry,
503-
$baseEventSourcingConfiguration
504-
)
494+
SaveAggregateServiceBuilder::create($baseEventSourcingConfiguration)
505495
->withAggregateRepositoryFactories($this->aggregateRepositoryReferenceNames)
506496
->withPublishEvents(false)
507497
)

0 commit comments

Comments
 (0)