Skip to content

Commit dd3db9e

Browse files
committed
Fixed last commit
1 parent 06c694e commit dd3db9e

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/State.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace Kiboko\Component\Flow\RabbitMQ;
44

5-
use Bunny\Client;
65
use Kiboko\Contract\Pipeline\StateInterface;
76

87
final class State implements StateInterface
@@ -20,8 +19,6 @@ public function __construct(
2019

2120
public function initialize(): void
2221
{
23-
$this->manager->stepState($this);
24-
2522
$this->acceptMetric = 0;
2623
$this->rejectMetric = 0;
2724
$this->errorMetric = 0;

src/StateManager.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,10 @@ public function __destruct()
3737
}
3838

3939
public function stepState(
40-
State $state
40+
string $stepCode,
41+
string $stepLabel,
4142
): State {
42-
return $this->steps[] = $state;
43+
return $this->steps[] = new State($this, $stepCode, $stepLabel);
4344
}
4445

4546
public function trySend($count): void

0 commit comments

Comments
 (0)