diff --git a/src/Rules/Functions/PrintfParameterTypeRule.php b/src/Rules/Functions/PrintfParameterTypeRule.php index 3c83e765b9..d91da4590e 100644 --- a/src/Rules/Functions/PrintfParameterTypeRule.php +++ b/src/Rules/Functions/PrintfParameterTypeRule.php @@ -106,8 +106,8 @@ public function processNode(Node $node, Scope $scope): array 'strict-int' => 'int', 'int' => 'int', 'float' => 'float', - 'string' => '__stringandstringable', - 'mixed' => '__stringandstringable', + 'string' => 'string', + 'mixed' => 'string', ] : [ 'strict-int' => 'int', diff --git a/tests/PHPStan/Rules/Functions/PrintfParameterTypeRuleTest.php b/tests/PHPStan/Rules/Functions/PrintfParameterTypeRuleTest.php index c945ff723f..06e34b998c 100644 --- a/tests/PHPStan/Rules/Functions/PrintfParameterTypeRuleTest.php +++ b/tests/PHPStan/Rules/Functions/PrintfParameterTypeRuleTest.php @@ -239,11 +239,11 @@ public function testStrict(): void 45, ], [ - 'Parameter #2 of function printf is expected to be __stringandstringable by placeholder #1 ("%s"), null given.', + 'Parameter #2 of function printf is expected to be string by placeholder #1 ("%s"), null given.', 47, ], [ - 'Parameter #2 of function printf is expected to be __stringandstringable by placeholder #1 ("%s"), true given.', + 'Parameter #2 of function printf is expected to be string by placeholder #1 ("%s"), true given.', 48, ], ]);