Skip to content

Commit

Permalink
Updated the pipeline runner used for tests + ran php-cs-fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
sebprt committed Nov 22, 2023
1 parent a551c76 commit 87169db
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 15 deletions.
3 changes: 1 addition & 2 deletions src/FingersCrossed/Loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ public function __construct(
private ?array $columns = null,
private bool $firstLineAsHeaders = true,
private LoggerInterface $logger = new NullLogger()
) {
}
) {}

public function load(): \Generator
{
Expand Down
3 changes: 1 addition & 2 deletions src/Safe/Loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ public function __construct(
private ?array $columns = null,
private bool $firstLineAsHeaders = true,
private LoggerInterface $logger = new NullLogger()
) {
}
) {}

public function load(): \Generator
{
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 87169db

Please sign in to comment.