Skip to content

Commit

Permalink
tests: improve TestLogger type safety
Browse files Browse the repository at this point in the history
  • Loading branch information
xificurk committed Aug 3, 2024
1 parent 58e7234 commit d24ae3c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/MessageBus/Logging/TestLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
namespace NepadaTests\MessageBus\Logging;

use Psr\Log\AbstractLogger;
use function is_string;

// phpcs:disable Squiz.Commenting.FunctionComment.TypeHintMissing
final class TestLogger extends AbstractLogger
Expand All @@ -26,6 +27,7 @@ final class TestLogger extends AbstractLogger
*/
public function log(mixed $level, $message, array $context = []): void
{
assert(is_string($level) || is_int($level));
$record = [
'level' => $level,
'message' => $message,
Expand Down

0 comments on commit d24ae3c

Please sign in to comment.