Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e3fd45f

Browse files
schlndhondrejmirtes
authored andcommitted
use string instead of __stringandstringable in printf parameter error message
1 parent 99b3d82 commit e3fd45f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

‎src/Rules/Functions/PrintfParameterTypeRule.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ public function processNode(Node $node, Scope $scope): array
106106
'strict-int' => 'int',
107107
'int' => 'int',
108108
'float' => 'float',
109-
'string' => '__stringandstringable',
110-
'mixed' => '__stringandstringable',
109+
'string' => 'string',
110+
'mixed' => 'string',
111111
]
112112
: [
113113
'strict-int' => 'int',

‎tests/PHPStan/Rules/Functions/PrintfParameterTypeRuleTest.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,11 +239,11 @@ public function testStrict(): void
239239
45,
240240
],
241241
[
242-
'Parameter #2 of function printf is expected to be __stringandstringable by placeholder #1 ("%s"), null given.',
242+
'Parameter #2 of function printf is expected to be string by placeholder #1 ("%s"), null given.',
243243
47,
244244
],
245245
[
246-
'Parameter #2 of function printf is expected to be __stringandstringable by placeholder #1 ("%s"), true given.',
246+
'Parameter #2 of function printf is expected to be string by placeholder #1 ("%s"), true given.',
247247
48,
248248
],
249249
]);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /