diff --git a/conf/bleedingEdge.neon b/conf/bleedingEdge.neon index 6f9c5d35bf..bb5878f406 100644 --- a/conf/bleedingEdge.neon +++ b/conf/bleedingEdge.neon @@ -39,3 +39,5 @@ parameters: stricterFunctionMap: true invalidPhpDocTagLine: true detectDeadTypeInMultiCatch: true + stubFiles: + - ../stubs/bleedingEdge/Rule.stub diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index ff7817b66e..409c9d06b6 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -440,6 +440,16 @@ parameters: count: 1 path: src/Rules/Api/NodeConnectingVisitorAttributesRule.php + - + message: "#^Method PHPStan\\\\Rules\\\\Arrays\\\\AppendedArrayItemTypeRule\\:\\:processNode\\(\\) should return list\\ but returns array\\{PHPStan\\\\Rules\\\\TipRuleError\\}\\.$#" + count: 1 + path: src/Rules/Arrays/AppendedArrayItemTypeRule.php + + - + message: "#^Method PHPStan\\\\Rules\\\\Arrays\\\\AppendedArrayKeyTypeRule\\:\\:processNode\\(\\) should return list\\ but returns array\\{PHPStan\\\\Rules\\\\RuleError\\}\\.$#" + count: 1 + path: src/Rules/Arrays/AppendedArrayKeyTypeRule.php + - message: "#^Doing instanceof PHPStan\\\\Type\\\\ConstantScalarType is error\\-prone and deprecated\\. Use Type\\:\\:isConstantScalarValue\\(\\) or Type\\:\\:getConstantScalarTypes\\(\\) or Type\\:\\:getConstantScalarValues\\(\\) instead\\.$#" count: 1 @@ -518,6 +528,11 @@ parameters: count: 4 path: src/Rules/Comparison/MatchExpressionRule.php + - + message: "#^Method PHPStan\\\\Rules\\\\Comparison\\\\MatchExpressionRule\\:\\:processNode\\(\\) should return list\\ but returns list\\\\.$#" + count: 1 + path: src/Rules/Comparison/MatchExpressionRule.php + - message: "#^Doing instanceof PHPStan\\\\Type\\\\Constant\\\\ConstantBooleanType is error\\-prone and deprecated\\. Use Type\\:\\:isTrue\\(\\) or Type\\:\\:isFalse\\(\\) instead\\.$#" count: 2 @@ -538,11 +553,21 @@ parameters: count: 1 path: src/Rules/Comparison/UnreachableIfBranchesRule.php + - + message: "#^Method PHPStan\\\\Rules\\\\Comparison\\\\UnreachableIfBranchesRule\\:\\:processNode\\(\\) should return list\\ but returns list\\\\.$#" + count: 1 + path: src/Rules/Comparison/UnreachableIfBranchesRule.php + - message: "#^Doing instanceof PHPStan\\\\Type\\\\Constant\\\\ConstantBooleanType is error\\-prone and deprecated\\. Use Type\\:\\:isTrue\\(\\) or Type\\:\\:isFalse\\(\\) instead\\.$#" count: 1 path: src/Rules/Comparison/UnreachableTernaryElseBranchRule.php + - + message: "#^Method PHPStan\\\\Rules\\\\Comparison\\\\UnreachableTernaryElseBranchRule\\:\\:processNode\\(\\) should return list\\ but returns array\\{PHPStan\\\\Rules\\\\LineRuleError\\}\\.$#" + count: 1 + path: src/Rules/Comparison/UnreachableTernaryElseBranchRule.php + - message: "#^Doing instanceof PHPStan\\\\Type\\\\Constant\\\\ConstantBooleanType is error\\-prone and deprecated\\. Use Type\\:\\:isTrue\\(\\) or Type\\:\\:isFalse\\(\\) instead\\.$#" count: 1 diff --git a/stubs/bleedingEdge/Rule.stub b/stubs/bleedingEdge/Rule.stub new file mode 100644 index 0000000000..0a86ea9d2c --- /dev/null +++ b/stubs/bleedingEdge/Rule.stub @@ -0,0 +1,26 @@ + + */ + public function getNodeType(): string; + + /** + * @phpstan-param TNodeType $node + * @return list + */ + public function processNode(Node $node, Scope $scope): array; + +}