Skip to content

Commit be76c67

Browse files
committed
Merge remote-tracking branch 'origin/1.12.x' into 2.0.x
2 parents 7b8aadc + c54b257 commit be76c67

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

phpstan-baseline.neon

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ parameters:
4343
path: src/Analyser/MutatingScope.php
4444

4545
-
46-
message: "#^Doing instanceof PHPStan\\\\Type\\\\Constant\\\\ConstantBooleanType is error\\-prone and deprecated\\. Use Type\\:\\:isTrue\\(\\) or Type\\:\\:isFalse\\(\\) instead\\.$#"
46+
message: '#^Doing instanceof PHPStan\\Type\\Constant\\ConstantBooleanType is error\-prone and deprecated\. Use Type\:\:isTrue\(\) or Type\:\:isFalse\(\) instead\.$#'
47+
identifier: phpstanApi.instanceofType
4748
count: 2
4849
path: src/Analyser/NodeScopeResolver.php
4950

@@ -671,6 +672,12 @@ parameters:
671672
count: 1
672673
path: src/Rules/RuleLevelHelper.php
673674

675+
-
676+
message: '#^Doing instanceof PHPStan\\Type\\ObjectType is error\-prone and deprecated\. Use Type\:\:isObject\(\) or Type\:\:getObjectClassNames\(\) instead\.$#'
677+
identifier: phpstanApi.instanceofType
678+
count: 2
679+
path: src/Rules/RuleLevelHelper.php
680+
674681
-
675682
message: '#^Doing instanceof PHPStan\\Type\\Constant\\ConstantBooleanType is error\-prone and deprecated\. Use Type\:\:isTrue\(\) or Type\:\:isFalse\(\) instead\.$#'
676683
identifier: phpstanApi.instanceofType

src/Type/TypeCombinator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -852,8 +852,8 @@ private static function optimizeConstantArrays(array $types): array
852852
$eachIsList = false;
853853
}
854854

855-
$keyType = self::union(...array_values($keyTypes));
856-
$valueType = self::union(...array_values($valueTypes));
855+
$keyType = self::union(...$keyTypes);
856+
$valueType = self::union(...$valueTypes);
857857

858858
$arrayType = new ArrayType($keyType, $valueType);
859859
if ($eachIsList) {

0 commit comments

Comments
 (0)