Narrow foreach body to non-empty regardless of polluteScopeWithAlwaysIterableForeach #31610
tests.yml
on: pull_request
Matrix: Tests PHPUnit 12.x
Determine levels tests matrix
46s
Matrix: Integration tests
Matrix: Tests PHPUnit 11.x
Matrix: Tests with old PHPUnit
Matrix: Mutation Testing
Matrix: Levels tests
Annotations
2 errors and 4 warnings
|
Mutation Testing (8.4, ubuntu-latest)
Process completed with exit code 1.
|
|
Mutation Testing (8.3, ubuntu-latest)
Process completed with exit code 1.
|
|
Mutation Testing (8.4, ubuntu-latest):
src/Analyser/NodeScopeResolver.php#L1717
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
$this->narrowForeachBodyNonEmpty
&& !$this->polluteScopeWithAlwaysIterableForeach
&& !$iterateeCertainty->no()
- && !$isIterableAtLeastOnce->yes()
+ && $isIterableAtLeastOnce->no()
) {
// With the flag off the after-loop scope must not assume the loop ran, so
// undo the body narrowing: restore the iteratee's possibly-empty-ness
|
|
Mutation Testing (8.4, ubuntu-latest):
src/Analyser/NodeScopeResolver.php#L1716
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
if (
$this->narrowForeachBodyNonEmpty
&& !$this->polluteScopeWithAlwaysIterableForeach
- && !$iterateeCertainty->no()
+ && $iterateeCertainty->yes()
&& !$isIterableAtLeastOnce->yes()
) {
// With the flag off the after-loop scope must not assume the loop ran, so
|
|
Mutation Testing (8.3, ubuntu-latest):
src/Analyser/NodeScopeResolver.php#L1717
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
$this->narrowForeachBodyNonEmpty
&& !$this->polluteScopeWithAlwaysIterableForeach
&& !$iterateeCertainty->no()
- && !$isIterableAtLeastOnce->yes()
+ && $isIterableAtLeastOnce->no()
) {
// With the flag off the after-loop scope must not assume the loop ran, so
// undo the body narrowing: restore the iteratee's possibly-empty-ness
|
|
Mutation Testing (8.3, ubuntu-latest):
src/Analyser/NodeScopeResolver.php#L1716
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator":
@@ @@
if (
$this->narrowForeachBodyNonEmpty
&& !$this->polluteScopeWithAlwaysIterableForeach
- && !$iterateeCertainty->no()
+ && $iterateeCertainty->yes()
&& !$isIterableAtLeastOnce->yes()
) {
// With the flag off the after-loop scope must not assume the loop ran, so
|
Artifacts
Produced during runtime
| Name | Size | Digest | |
|---|---|---|---|
|
coverage-reports
|
216 MB |
sha256:8e253a6a6f9cb89078f3b5266f84e5f6893f941478c61b0a03f605e5c14a3dde
|
|
|
coverage-reports
|
210 MB |
sha256:524c73b8a95258142fae79a72be3ff039bd0a0302653f506ebc6644b75bd5812
|
|