Skip to content

Commit

Permalink
Merge pull request #8 from php-etl/feature/update-contracts
Browse files Browse the repository at this point in the history
Updated php-etl contract versions
  • Loading branch information
gplanchat authored Nov 22, 2023
2 parents 440fff9 + c3843d5 commit 2826d06
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 14 deletions.
4 changes: 1 addition & 3 deletions src/Lookup.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ class Lookup implements TransformerInterface, FlushableInterface
* @param array<int,string> $beforeQueries
* @param array<int,string> $afterQueries
*/
public function __construct(private readonly \PDO $connection, private readonly CompiledMapperInterface $mapper, private readonly array $beforeQueries = [], private readonly array $afterQueries = [], private readonly LoggerInterface $logger = new NullLogger())
{
}
public function __construct(private readonly \PDO $connection, private readonly CompiledMapperInterface $mapper, private readonly array $beforeQueries = [], private readonly array $afterQueries = [], private readonly LoggerInterface $logger = new NullLogger()) {}

/**
* @return \Generator<mixed>
Expand Down
17 changes: 6 additions & 11 deletions tests/functional/PipelineRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,18 @@
use Kiboko\Contract\Bucket\AcceptanceResultBucketInterface;
use Kiboko\Contract\Bucket\RejectionResultBucketInterface;
use Kiboko\Contract\Pipeline\PipelineRunnerInterface;
use Kiboko\Contract\Pipeline\RejectionInterface;
use Kiboko\Contract\Pipeline\StateInterface;
use Kiboko\Contract\Pipeline\StepRejectionInterface;
use Kiboko\Contract\Pipeline\StepStateInterface;

final class PipelineRunner implements PipelineRunnerInterface
{
public function run(
\Iterator $source,
\Generator $async,
RejectionInterface $rejection,
StateInterface $state,
): \Iterator {
$state->initialize();
$rejection->initialize();

StepRejectionInterface $rejection,
StepStateInterface $state,
): \Iterator
{
$source->rewind();
$async->rewind();

Expand All @@ -40,8 +38,5 @@ public function run(

$source->next();
}

$rejection->teardown();
$state->teardown();
}
}

0 comments on commit 2826d06

Please sign in to comment.