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 @@ -1710,7 +1710,7 @@ parameters:
17101710 -
17111711 rawMessage : ' Doing instanceof PHPStan\Type\Constant\ConstantStringType is error-prone and deprecated. Use Type::getConstantStrings() instead.'
17121712 identifier : phpstanApi.instanceofType
1713- count : 3
1713+ count : 2
17141714 path : src/Type/TypeCombinator.php
17151715
17161716 -
@@ -1743,18 +1743,6 @@ parameters:
17431743 count : 2
17441744 path : src/Type/TypeCombinator.php
17451745
1746- -
1747- rawMessage : Instanceof between PHPStan\Type\Constant\ConstantIntegerType and PHPStan\Type\Constant\ConstantIntegerType will always evaluate to true.
1748- identifier : instanceof.alwaysTrue
1749- count : 1
1750- path : src/Type/TypeCombinator.php
1751-
1752- -
1753- rawMessage : Result of || is always true.
1754- identifier : booleanOr.alwaysTrue
1755- count : 1
1756- path : src/Type/TypeCombinator.php
1757-
17581746 -
17591747 rawMessage : Doing instanceof PHPStan\Type\IntersectionType is error-prone and deprecated.
17601748 identifier : phpstanApi.instanceofType
Original file line number Diff line number Diff line change @@ -793,10 +793,7 @@ private static function processArrayAccessoryTypes(array $arrayTypes): array
793793 continue ;
794794 }
795795 if ($ innerType instanceof HasOffsetType) {
796- $ offset = $ innerType ->getOffsetType ();
797- if ($ offset instanceof ConstantStringType || $ offset instanceof ConstantIntegerType) {
798- $ innerType = new HasOffsetValueType ($ offset , $ arrayType ->getIterableValueType ());
799- }
796+ $ innerType = new HasOffsetValueType ($ innerType ->getOffsetType (), $ arrayType ->getIterableValueType ());
800797 }
801798 if ($ innerType instanceof HasOffsetValueType) {
802799 $ accessoryTypes [sprintf ('hasOffsetValue(%s) ' , $ innerType ->getOffsetType ()->describe (VerbosityLevel::cache ()))][$ i ] = $ innerType ;
You can’t perform that action at this time.
0 commit comments