File tree Expand file tree Collapse file tree 2 files changed +2
-17
lines changed
Expand file tree Collapse file tree 2 files changed +2
-17
lines changed Original file line number Diff line number Diff line change @@ -1716,7 +1716,7 @@ parameters:
17161716 -
17171717 rawMessage : ' Doing instanceof PHPStan\Type\Constant\ConstantStringType is error-prone and deprecated. Use Type::getConstantStrings() instead.'
17181718 identifier : phpstanApi.instanceofType
1719- count : 3
1719+ count : 2
17201720 path : src/Type/TypeCombinator.php
17211721
17221722 -
@@ -1749,18 +1749,6 @@ parameters:
17491749 count : 2
17501750 path : src/Type/TypeCombinator.php
17511751
1752- -
1753- rawMessage : Instanceof between PHPStan\Type\Constant\ConstantIntegerType and PHPStan\Type\Constant\ConstantIntegerType will always evaluate to true.
1754- identifier : instanceof.alwaysTrue
1755- count : 1
1756- path : src/Type/TypeCombinator.php
1757-
1758- -
1759- rawMessage : Result of || is always true.
1760- identifier : booleanOr.alwaysTrue
1761- count : 1
1762- path : src/Type/TypeCombinator.php
1763-
17641752 -
17651753 rawMessage : Doing instanceof PHPStan\Type\IntersectionType is error-prone and deprecated.
17661754 identifier : phpstanApi.instanceofType
Original file line number Diff line number Diff line change @@ -825,10 +825,7 @@ private static function processArrayAccessoryTypes(array $arrayTypes): array
825825 continue ;
826826 }
827827 if ($ innerType instanceof HasOffsetType) {
828- $ offset = $ innerType ->getOffsetType ();
829- if ($ offset instanceof ConstantStringType || $ offset instanceof ConstantIntegerType) {
830- $ innerType = new HasOffsetValueType ($ offset , $ arrayType ->getIterableValueType ());
831- }
828+ $ innerType = new HasOffsetValueType ($ innerType ->getOffsetType (), $ arrayType ->getIterableValueType ());
832829 }
833830 if ($ innerType instanceof HasOffsetValueType) {
834831 $ accessoryTypes [sprintf ('hasOffsetValue(%s) ' , $ innerType ->getOffsetType ()->describe (VerbosityLevel::cache ()))][$ i ] = $ innerType ;
You can’t perform that action at this time.
0 commit comments