Skip to content

Commit a2c8307

Browse files
committed
Integrated state and rejection handling interfaces
Upgraded version number to v0.2
1 parent 2e1a24a commit a2c8307

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

src/NullState.php

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

33
namespace Kiboko\Contract\Pipeline;
44

5+
use Kiboko\Contract\Bucket\ResultBucketInterface;
6+
57
final class NullState implements StateInterface
68
{
79
public function initialize(int $start = 0): void
@@ -13,4 +15,14 @@ public function increment(int $step = 1): void
1315
{
1416
// NOOP
1517
}
18+
19+
public function reject(int $step = 1): void
20+
{
21+
// NOOP
22+
}
23+
24+
public function incrementFromBucket(ResultBucketInterface $bucket): void
25+
{
26+
// NOOP
27+
}
1628
}

src/StateInterface.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@
22

33
namespace Kiboko\Contract\Pipeline;
44

5+
use Kiboko\Contract\Bucket\ResultBucketInterface;
6+
57
interface StateInterface
68
{
79
public function initialize(int $start = 0): void;
810
public function increment(int $step = 1): void;
11+
public function reject(int $step = 1): void;
12+
public function incrementFromBucket(ResultBucketInterface $bucket): void;
913
}

0 commit comments

Comments
 (0)