Make name a property of Step.args instead of Step

[MAILPOET-4445]
This commit is contained in:
David Remer
2022-08-12 11:50:45 +03:00
committed by Veljko V
parent 2a09646e8d
commit 24849afb7a
16 changed files with 35 additions and 80 deletions

View File

@@ -9,9 +9,6 @@ class Step {
/** @var string */
private $id;
/** @var ?string */
private $name;
/** @var string */
private $type;
@@ -26,14 +23,12 @@ class Step {
public function __construct(
string $id,
?string $name,
string $type,
string $key,
?string $nextStepId = null,
array $args = []
) {
$this->id = $id;
$this->name = $name;
$this->type = $type;
$this->key = $key;
$this->nextStepId = $nextStepId;
@@ -44,10 +39,6 @@ class Step {
return $this->id;
}
public function getName(): ?string {
return $this->name;
}
public function getType(): string {
return $this->type;
}
@@ -71,7 +62,6 @@ class Step {
public function toArray(): array {
return [
'id' => $this->id,
'name' => $this->name,
'type' => $this->type,
'key' => $this->key,
'next_step_id' => $this->nextStepId,

View File

@@ -170,7 +170,6 @@ class Workflow {
foreach ($data as $step) {
$steps[] = new Step(
$step['id'],
$step['name'] ?? null,
$step['type'],
$step['key'],
$step['next_step_id'] ?? null,