mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-24 01:56:18 +02:00
Static analysis improvements (#1475)
* Static analysis improvements * Fix review issues
This commit is contained in:
@@ -139,13 +139,16 @@ class TestHandler extends AbstractProcessingHandler
|
||||
*/
|
||||
public function hasRecordThatMatches(string $regex, $level): bool
|
||||
{
|
||||
return $this->hasRecordThatPasses(function ($rec) use ($regex) {
|
||||
return $this->hasRecordThatPasses(function (array $rec) use ($regex): bool {
|
||||
return preg_match($regex, $rec['message']) > 0;
|
||||
}, $level);
|
||||
}
|
||||
|
||||
/**
|
||||
* @psalm-param callable(array, int): mixed $predicate
|
||||
*
|
||||
* @param string|int $level Logging level value or name
|
||||
* @return bool
|
||||
*/
|
||||
public function hasRecordThatPasses(callable $predicate, $level)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user