Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions tests/Rules/MessageInterpolationRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ public function testSymfonyExample(): void
'Using interpolated strings in log messages is potentially a security risk. Use PSR-3 placeholders instead.',
22,
],
[
'Using interpolated strings in log messages is potentially a security risk. Use PSR-3 placeholders instead.',
24,
],
]);
}

Expand Down
2 changes: 2 additions & 0 deletions tests/Rules/data/symfony-example.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ function wrong(LoggerInterface $logger, string $s, $b)
]);

$logger->info("Failed user login for {$_POST['username']}.");

$logger->error(\sprintf('Error with userId "%s"', $s));
}

function good(LoggerInterface $logger, bool $nativeBool)
Expand Down