Skip to content

Commit

Permalink
Merge branch 'state-reconstructor' of https://github.com/hirethunk/verbs
Browse files Browse the repository at this point in the history
 into state-reconstructor
  • Loading branch information
inxilpro committed Dec 19, 2024
2 parents 7c3b226 + 8569f3e commit 789aa40
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/Lifecycle/AggregateStateSummary.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public static function summarize(State ...$states): static
{
$summary = new static(
original_states: Collection::make($states),
related_event_ids: new Collection(),
related_event_ids: new Collection,
related_states: Collection::make($states)->map(StateIdentity::from(...)),
);

Expand All @@ -27,9 +27,9 @@ public static function summarize(State ...$states): static
* @param Collection<int, StateIdentity> $related_states
*/
public function __construct(
public Collection $original_states = new Collection(),
public Collection $related_event_ids = new Collection(),
public Collection $related_states = new Collection(),
public Collection $original_states = new Collection,
public Collection $related_event_ids = new Collection,
public Collection $related_states = new Collection,
) {}

protected function discover(): static
Expand Down
6 changes: 3 additions & 3 deletions tests/Unit/AggregateStateSummaryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
}
}

$target_state = new AggregateStateSummaryTestState1();
$target_state = new AggregateStateSummaryTestState1;
$target_state->id = 10;

$summary = AggregateStateSummary::summarize($target_state);
Expand Down Expand Up @@ -85,10 +85,10 @@
}
}

$target_state1 = new AggregateStateSummaryTestState1();
$target_state1 = new AggregateStateSummaryTestState1;
$target_state1->id = 10;

$target_state2 = new AggregateStateSummaryTestState2();
$target_state2 = new AggregateStateSummaryTestState2;
$target_state2->id = 11;

$summary = AggregateStateSummary::summarize($target_state1, $target_state2);
Expand Down

0 comments on commit 789aa40

Please sign in to comment.