Skip to content

Fixed PHPStan not recognizing the Traverser value type #786

Fixed PHPStan not recognizing the Traverser value type

Fixed PHPStan not recognizing the Traverser value type #786

Triggered via pull request December 26, 2023 23:30
Status Success
Total duration 59s
Artifacts 3

ci.yml

on: pull_request
Matrix: Mutation test
Matrix: phpstan analyze
Matrix: Unit test
Fit to window
Zoom out
Zoom in

Annotations

13 warnings
Unit test (8.0)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, codecov/codecov-action@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
phpstan analyze (8.0)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
Mutation test (8.0)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
Mutation test (8.0): await-generator/src/SOFe/AwaitGenerator/Await.php#L224
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ /** @var Generator $input */ $wrapped[$k] = (function () use($input, $ch) { yield from $ch->receive(); - $input->rewind(); + if (!$input->valid()) { return $input->getReturn(); }
Mutation test (8.0): await-generator/src/SOFe/AwaitGenerator/Await.php#L232
Escaped Mutant for Mutator "YieldValue": --- Original +++ New @@ @@ $ch->sendWithoutWait(null); while ($input->valid()) { try { - $send = (yield $input->key() => $input->current()); + $send = (yield $input->current()); $input->send($send); } catch (Throwable $e) { $input->throw($e);
Mutation test (8.0): await-generator/src/SOFe/AwaitGenerator/Await.php#L274
Escaped Mutant for Mutator "LogicalAnd": --- Original +++ New @@ @@ throw $e; } finally { foreach ($generators as $key => $generator) { - if ($which !== null && $key !== $which) { + if ($which !== null || $key !== $which) { try { $generator->throw(new RaceLostException()); } catch (RaceLostException $e) {
Mutation test (8.0): await-generator/src/SOFe/AwaitGenerator/Await.php#L275
Escaped Mutant for Mutator "CatchBlockRemoval": --- Original +++ New @@ @@ $generator->throw(new RaceLostException()); } catch (RaceLostException $e) { // expected - } catch (Throwable $e) { - if ($firstException === null) { - $firstException = $e; - } } } }
Mutation test (8.0): await-generator/src/SOFe/AwaitGenerator/Await.php#L316
Escaped Mutant for Mutator "PublicVisibility": --- Original +++ New @@ @@ * * @internal This is implementation detail. Existence, signature and behaviour are semver-exempt. */ - public function wakeupFlat(?callable $executor) : void + protected function wakeupFlat(?callable $executor) : void { while ($executor !== null) { $executor = $this->wakeup($executor);
Mutation test (8.0): await-generator/src/SOFe/AwaitGenerator/Await.php#L397
Escaped Mutant for Mutator "IncrementInteger": --- Original +++ New @@ @@ break; } if ($promise->state === self::STATE_REJECTED) { - $hasResult = 2; + $hasResult = 3; $result = $promise->rejected; break; }
Mutation test (8.0): await-generator/src/SOFe/AwaitGenerator/Await.php#L435
Escaped Mutant for Mutator "Foreach_": --- Original +++ New @@ @@ // first check if nothing is immediately rejected foreach ($this->promiseQueue as $promise) { if ($promise->state === self::STATE_REJECTED) { - foreach ($this->promiseQueue as $p) { + foreach (array() as $p) { $p->cancelled = true; } $this->promiseQueue = [];
Mutation test (8.0): await-generator/src/SOFe/AwaitGenerator/Await.php#L436
Escaped Mutant for Mutator "TrueValue": --- Original +++ New @@ @@ foreach ($this->promiseQueue as $promise) { if ($promise->state === self::STATE_REJECTED) { foreach ($this->promiseQueue as $p) { - $p->cancelled = true; + $p->cancelled = false; } $this->promiseQueue = []; $ex = $promise->rejected;
Mutation test (8.0): await-generator/src/SOFe/AwaitGenerator/Await.php#L463
Escaped Mutant for Mutator "InstanceOf_": --- Original +++ New @@ @@ $this->generator->send($current === self::ONCE ? $results[0] : $results); }; } - if ($current instanceof Generator) { + if (false) { if (!self::$warnedDeprecatedDirectYield) { echo "\n" . 'NOTICE: `yield $generator` has been deprecated, please use `yield from $generator` instead.' . "\n"; self::$warnedDeprecatedDirectYield = true;
Mutation test (8.0): await-generator/src/SOFe/AwaitGenerator/Await.php#L507
Escaped Mutant for Mutator "Identical": --- Original +++ New @@ @@ public function recheckPromiseQueue(AwaitChild $changed) : void { assert($this->sleeping); - if ($this->current === self::ONCE) { + if ($this->current !== self::ONCE) { assert(count($this->promiseQueue) === 1); } if ($this->current === self::RACE) {

Artifacts

Produced during runtime
Name Size
infection-per-mutator.md Expired
5.12 KB
infection-summary.log Expired
115 Bytes
infection.log Expired
33.9 KB