Skip to content

Commit

Permalink
Updated constraints (used new interfaces)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebprt committed Nov 20, 2023
1 parent fd1758d commit cd8c588
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 28 deletions.
8 changes: 4 additions & 4 deletions src/Constraint/Pipeline/PipelineExtractsLike.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
namespace Kiboko\Component\PHPUnitExtension\Constraint\Pipeline;

use Kiboko\Contract\Pipeline\ExtractorInterface;
use Kiboko\Contract\Pipeline\NullRejection;
use Kiboko\Contract\Pipeline\NullState;
use Kiboko\Contract\Pipeline\NullStepRejection;
use Kiboko\Contract\Pipeline\NullStepState;
use Kiboko\Contract\Pipeline\PipelineRunnerInterface;
use PHPUnit\Framework\Constraint\Constraint;

Expand Down Expand Up @@ -67,8 +67,8 @@ public function matches($other): bool
$iterator = $this->runner->run(
$this->asIterator($extract),

Check failure on line 68 in src/Constraint/Pipeline/PipelineExtractsLike.php

View workflow job for this annotation

GitHub Actions / phpstan

Parameter #1 $iterable of method Kiboko\Component\PHPUnitExtension\Constraint\Pipeline\PipelineExtractsLike<Type>::asIterator() expects iterable<int, Type>, iterable<int, Kiboko\Contract\Bucket\ResultBucketInterface<mixed>> given.

Check failure on line 68 in src/Constraint/Pipeline/PipelineExtractsLike.php

View workflow job for this annotation

GitHub Actions / phpstan

Parameter #1 $iterable of method Kiboko\Component\PHPUnitExtension\Constraint\Pipeline\PipelineExtractsLike<Type>::asIterator() expects iterable<int, Type>, iterable<int, Kiboko\Contract\Bucket\ResultBucketInterface<mixed>> given.
$this->passThroughCoroutine(),
new NullRejection(),
new NullState(),
new NullStepRejection(),
new NullStepState(),
);
$both->attachIterator($iterator);

Expand Down
16 changes: 8 additions & 8 deletions src/Constraint/Pipeline/PipelineLoadsLike.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

use Kiboko\Contract\Pipeline\FlushableInterface;
use Kiboko\Contract\Pipeline\LoaderInterface;
use Kiboko\Contract\Pipeline\NullRejection;
use Kiboko\Contract\Pipeline\NullState;
use Kiboko\Contract\Pipeline\NullStepRejection;
use Kiboko\Contract\Pipeline\NullStepState;
use Kiboko\Contract\Pipeline\PipelineRunnerInterface;
use PHPUnit\Framework\Constraint\Constraint;

Expand Down Expand Up @@ -67,8 +67,8 @@ public function matches($other): bool
$this->runner->run(
$this->asIterator($this->source),
$other->load(),
new NullRejection(),
new NullState(),
new NullStepRejection(),
new NullStepState(),
)
);
$iterator->append(
Expand All @@ -78,16 +78,16 @@ public function matches($other): bool
yield;
yield $other->flush();
})(),
new NullRejection(),
new NullState(),
new NullStepRejection(),
new NullStepState(),
)
);
} else {
$iterator = $this->runner->run(
$this->asIterator($this->source),
$other->load(),
new NullRejection(),
new NullState(),
new NullStepRejection(),
new NullStepState(),
);
}
$both->attachIterator($iterator);
Expand Down
16 changes: 8 additions & 8 deletions src/Constraint/Pipeline/PipelineTransformsLike.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
namespace Kiboko\Component\PHPUnitExtension\Constraint\Pipeline;

use Kiboko\Contract\Pipeline\FlushableInterface;
use Kiboko\Contract\Pipeline\NullRejection;
use Kiboko\Contract\Pipeline\NullState;
use Kiboko\Contract\Pipeline\NullStepRejection;
use Kiboko\Contract\Pipeline\NullStepState;
use Kiboko\Contract\Pipeline\PipelineRunnerInterface;
use Kiboko\Contract\Pipeline\TransformerInterface;
use PHPUnit\Framework\Constraint\Constraint;
Expand Down Expand Up @@ -67,8 +67,8 @@ public function matches($other): bool
$this->runner->run(
$this->asIterator($this->source),
$other->transform(),
new NullRejection(),
new NullState(),
new NullStepRejection(),
new NullStepState(),
)
);
$iterator->append(
Expand All @@ -78,16 +78,16 @@ public function matches($other): bool
yield;
yield $other->flush();
})(),
new NullRejection(),
new NullState(),
new NullStepRejection(),
new NullStepState(),
)
);
} else {
$iterator = $this->runner->run(
$this->asIterator($this->source),
$other->transform(),
new NullRejection(),
new NullState(),
new NullStepRejection(),
new NullStepState(),
);
}
$both->attachIterator($iterator);
Expand Down
16 changes: 8 additions & 8 deletions src/Constraint/Pipeline/PipelineWritesFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

use Kiboko\Contract\Pipeline\FlushableInterface;
use Kiboko\Contract\Pipeline\LoaderInterface;
use Kiboko\Contract\Pipeline\NullRejection;
use Kiboko\Contract\Pipeline\NullState;
use Kiboko\Contract\Pipeline\NullStepRejection;
use Kiboko\Contract\Pipeline\NullStepState;
use Kiboko\Contract\Pipeline\PipelineRunnerInterface;
use PHPUnit\Framework\Constraint\Constraint;
use PHPUnit\Framework\Constraint\FileExists;
Expand Down Expand Up @@ -58,8 +58,8 @@ public function matches($other): bool
$this->runner->run(
$this->asIterator($this->source),
$other->load(),
new NullRejection(),
new NullState(),
new NullStepRejection(),
new NullStepState(),
)
);
$iterator->append(
Expand All @@ -69,16 +69,16 @@ public function matches($other): bool
yield;
yield $other->flush();
})(),
new NullRejection(),
new NullState(),
new NullStepRejection(),
new NullStepState(),
)
);
} else {
$iterator = $this->runner->run(
$this->asIterator($this->source),
$other->load(),
new NullRejection(),
new NullState(),
new NullStepRejection(),
new NullStepState(),
);
}

Expand Down

0 comments on commit cd8c588

Please sign in to comment.