Skip to content

Commit

Permalink
use ->isInteger()->yes() on ReturnTypeFromStrictNewArrayRector (recto…
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik authored Nov 12, 2024
1 parent d2db35e commit 06adce3
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
use PHPStan\Analyser\Scope;
use PHPStan\Type\ArrayType;
use PHPStan\Type\Constant\ConstantArrayType;
use PHPStan\Type\IntegerType;
use PHPStan\Type\IntersectionType;
use PHPStan\Type\MixedType;
use PHPStan\Type\NeverType;
Expand Down Expand Up @@ -270,7 +269,7 @@ private function shouldAddReturnArrayDocType(ArrayType $arrayType): bool
}

// handle only simple arrays
if (! $arrayType->getKeyType() instanceof IntegerType) {
if (! $arrayType->getKeyType()->isInteger()->yes()) {
return false;
}
}
Expand Down

0 comments on commit 06adce3

Please sign in to comment.