Skip to content

Commit

Permalink
Removing a deprecated class
Browse files Browse the repository at this point in the history
  • Loading branch information
gplanchat committed Sep 28, 2021
1 parent ea1e664 commit e0d6af2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Transformer/BatchingTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Kiboko\Component\Pipeline\Transformer;

use Kiboko\Component\Bucket\AcceptanceAppendableResultBucket;
use Kiboko\Component\Bucket\AppendableIteratorAcceptanceResultBucket;
use Kiboko\Component\Bucket\EmptyResultBucket;
use Kiboko\Contract\Bucket\ResultBucketInterface;
use Kiboko\Contract\Pipeline\FlushableInterface;
Expand All @@ -18,10 +18,10 @@ public function __construct(private int $batchSize)
$this->bucket = new EmptyResultBucket();
}

/** @return \Generator<mixed, AcceptanceAppendableResultBucket<Type>|EmptyResultBucket, null|Type, void> */
/** @return \Generator<mixed, AppendableIteratorAcceptanceResultBucket<Type>|EmptyResultBucket, null|Type, void> */
public function transform(): \Generator
{
$this->bucket = new AcceptanceAppendableResultBucket();
$this->bucket = new AppendableIteratorAcceptanceResultBucket();
$itemCount = 0;

$line = yield new EmptyResultBucket();
Expand All @@ -31,7 +31,7 @@ public function transform(): \Generator
if ($this->batchSize <= ++$itemCount) {
$line = yield $this->bucket;
$itemCount = 0;
$this->bucket = new AcceptanceAppendableResultBucket();
$this->bucket = new AppendableIteratorAcceptanceResultBucket();
} else {
$line = yield new EmptyResultBucket();
}
Expand Down

0 comments on commit e0d6af2

Please sign in to comment.