Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Analyser/ExprHandler/AssignHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -957,11 +957,11 @@
if ($has->yes()) {
$offsetValueType = $offsetValueType->getOffsetValueType($offsetType);
} elseif ($has->maybe()) {
if (!$scope->hasExpressionType($dimFetch)->yes()) {
$offsetValueType = TypeCombinator::union($offsetValueType->getOffsetValueType($offsetType), new ConstantArrayType([], []));
} else {
if ($scope->hasExpressionType($dimFetch)->yes()) {

Check warning on line 960 in src/Analyser/ExprHandler/AssignHandler.php

View workflow job for this annotation

GitHub Actions / Mutation Testing (8.3, ubuntu-latest)

Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator": @@ @@ if ($has->yes()) { $offsetValueType = $offsetValueType->getOffsetValueType($offsetType); } elseif ($has->maybe()) { - if ($scope->hasExpressionType($dimFetch)->yes()) { + if (!$scope->hasExpressionType($dimFetch)->no()) { $generalizeOnWrite = false; $offsetValueType = $offsetValueType->getOffsetValueType($offsetType); } else {

Check warning on line 960 in src/Analyser/ExprHandler/AssignHandler.php

View workflow job for this annotation

GitHub Actions / Mutation Testing (8.4, ubuntu-latest)

Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator": @@ @@ if ($has->yes()) { $offsetValueType = $offsetValueType->getOffsetValueType($offsetType); } elseif ($has->maybe()) { - if ($scope->hasExpressionType($dimFetch)->yes()) { + if (!$scope->hasExpressionType($dimFetch)->no()) { $generalizeOnWrite = false; $offsetValueType = $offsetValueType->getOffsetValueType($offsetType); } else {
$generalizeOnWrite = false;
$offsetValueType = $offsetValueType->getOffsetValueType($offsetType);
} else {
$offsetValueType = TypeCombinator::union($offsetValueType->getOffsetValueType($offsetType), new ConstantArrayType([], []));
}
} else {
$generalizeOnWrite = false;
Expand Down
Loading