Updated pipeline contracts to v0.5 #71
Annotations
10 warnings
src/GeneratorWrapper.php#L11
Escaped Mutant for Mutator "Foreach_":
--- Original
+++ New
@@ @@
{
public function rewind(\Iterator ...$iterators) : void
{
- foreach ($iterators as $iterator) {
+ foreach (array() as $iterator) {
$iterator->rewind();
}
}
|
src/GeneratorWrapper.php#L12
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
public function rewind(\Iterator ...$iterators) : void
{
foreach ($iterators as $iterator) {
- $iterator->rewind();
+
}
}
public function next(\Iterator ...$iterators) : void
|
src/GeneratorWrapper.php#L25
Escaped Mutant for Mutator "Foreach_":
--- Original
+++ New
@@ @@
}
public function valid(\Iterator ...$iterators) : bool
{
- foreach ($iterators as $iterator) {
+ foreach (array() as $iterator) {
if (!$iterator->valid()) {
return false;
}
|
src/GeneratorWrapper.php#L27
Escaped Mutant for Mutator "FalseValue":
--- Original
+++ New
@@ @@
{
foreach ($iterators as $iterator) {
if (!$iterator->valid()) {
- return false;
+ return true;
}
}
return true;
|
src/Pipeline.php#L35
Escaped Mutant for Mutator "Coalesce":
--- Original
+++ New
@@ @@
public function __construct(private readonly PipelineRunnerInterface $runner, private readonly StateInterface $state, ?\Iterator $source = null)
{
$this->source = new \AppendIterator();
- $this->source->append($source ?? new \EmptyIterator());
+ $this->source->append(new \EmptyIterator() ?? $source);
$this->subject = new \NoRewindIterator($this->source);
}
public function feed(...$data) : void
|
src/Pipeline.php#L35
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
public function __construct(private readonly PipelineRunnerInterface $runner, private readonly StateInterface $state, ?\Iterator $source = null)
{
$this->source = new \AppendIterator();
- $this->source->append($source ?? new \EmptyIterator());
+
$this->subject = new \NoRewindIterator($this->source);
}
public function feed(...$data) : void
|
src/Pipeline.php#L67
Escaped Mutant for Mutator "InstanceOf_":
--- Original
+++ New
@@ @@
$extract = $extractor->extract();
if (\is_array($extract)) {
$this->source->append($this->runner->run(new \ArrayIterator($extract), $this->passThroughCoroutine(), $rejection, $state));
- } elseif ($extract instanceof \Iterator) {
+ } elseif (true) {
$this->source->append($this->runner->run($extract, $this->passThroughCoroutine(), $rejection, $state));
} elseif ($extract instanceof \Traversable) {
$this->source->append($this->runner->run(new \IteratorIterator($extract), $this->passThroughCoroutine(), $rejection, $state));
|
src/Pipeline.php#L67
Escaped Mutant for Mutator "InstanceOf_":
--- Original
+++ New
@@ @@
$extract = $extractor->extract();
if (\is_array($extract)) {
$this->source->append($this->runner->run(new \ArrayIterator($extract), $this->passThroughCoroutine(), $rejection, $state));
- } elseif ($extract instanceof \Iterator) {
+ } elseif (false) {
$this->source->append($this->runner->run($extract, $this->passThroughCoroutine(), $rejection, $state));
} elseif ($extract instanceof \Traversable) {
$this->source->append($this->runner->run(new \IteratorIterator($extract), $this->passThroughCoroutine(), $rejection, $state));
|
src/Pipeline.php#L179
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
}
public function walk() : \Iterator
{
- $this->state->initialize();
+
yield from $this->subject;
$this->state->teardown();
}
|
src/Pipeline.php#L183
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
{
$this->state->initialize();
yield from $this->subject;
- $this->state->teardown();
+
}
public function run(int $interval = 1000) : int
{
|
The logs for this run have expired and are no longer available.
Loading