Skip to content

Merge pull request #17 from php-etl/feature/upgrade-pipeline-contracts #80

Merge pull request #17 from php-etl/feature/upgrade-pipeline-contracts

Merge pull request #17 from php-etl/feature/upgrade-pipeline-contracts #80

Triggered via push November 14, 2023 13:36
Status Success
Total duration 1m 2s
Artifacts 1

infection.yaml

on: push
infection
47s
infection
Fit to window
Zoom out
Zoom in

Annotations

10 warnings
infection: src/GeneratorWrapper.php#L17
Escaped Mutant for Mutator "Foreach_": --- Original +++ New @@ @@ /** @param \Iterator<int<0, max>, Type> ...$iterators */ public function rewind(\Iterator ...$iterators) : void { - foreach ($iterators as $iterator) { + foreach (array() as $iterator) { $iterator->rewind(); } }
infection: src/GeneratorWrapper.php#L18
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ public function rewind(\Iterator ...$iterators) : void { foreach ($iterators as $iterator) { - $iterator->rewind(); + } } /** @param \Iterator<int<0, max>, Type> ...$iterators */
infection: src/GeneratorWrapper.php#L33
Escaped Mutant for Mutator "Foreach_": --- Original +++ New @@ @@ /** @param \Iterator<int<0, max>, Type> ...$iterators */ public function valid(\Iterator ...$iterators) : bool { - foreach ($iterators as $iterator) { + foreach (array() as $iterator) { if (!$iterator->valid()) { return false; }
infection: src/GeneratorWrapper.php#L35
Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ { foreach ($iterators as $iterator) { if (!$iterator->valid()) { - return false; + return true; } } return true;
infection: src/Pipeline.php#L36
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); } /**
infection: src/Pipeline.php#L36
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); } /**
infection: src/Pipeline.php#L82
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));
infection: src/Pipeline.php#L82
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));
infection: src/Pipeline.php#L208
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ } public function walk() : \Iterator { - $this->state->initialize(); + yield from $this->subject; $this->state->teardown(); }
infection: src/Pipeline.php#L212
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ { $this->state->initialize(); yield from $this->subject; - $this->state->teardown(); + } public function run(int $interval = 1000) : int {

Artifacts

Produced during runtime
Name Size
artifact Expired
54.9 KB