Pass full step map to automation workflow so it can be validated

[MAILPOET-4629]
This commit is contained in:
Jan Jakes
2022-09-23 11:03:38 +02:00
committed by David Remer
parent 1f37be5ef3
commit 02aaba1ded
4 changed files with 12 additions and 15 deletions

View File

@@ -44,7 +44,7 @@ class Workflow {
/** @var array<string, Step> */
private $steps;
/** @param Step[] $steps */
/** @param array<string, Step> $steps */
public function __construct(
string $name,
array $steps,
@@ -53,11 +53,8 @@ class Workflow {
int $versionId = null
) {
$this->name = $name;
$this->steps = [];
$this->steps = $steps;
$this->author = $author;
foreach ($steps as $step) {
$this->steps[$step->getId()] = $step;
}
if ($id) {
$this->id = $id;