Skip to content

Commit

Permalink
Fix PHPStan
Browse files Browse the repository at this point in the history
  • Loading branch information
mabar committed Aug 27, 2024
1 parent 7d5592e commit 6e552d7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/Tracy/ToggleableTracyToPsrLoggerAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ final class ToggleableTracyToPsrLoggerAdapter extends TracyToPsrLoggerAdapter
public bool $enabled = true;

/**
* @param mixed $message
* @param array<mixed> $context
*/
public function log($level, $message, array $context = []): void
Expand Down
3 changes: 3 additions & 0 deletions tests/Doubles/TestLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ class TestLogger extends AbstractLogger
/** @var array<list<array{level: mixed, message: string|Stringable, context: array<mixed>}>> */
public array $recordsByLevel = [];

/**
* @param string|Stringable $message
*/
public function log($level, $message, array $context = []): void
{
$record = [
Expand Down
5 changes: 0 additions & 5 deletions tools/phpstan.baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ parameters:
count: 1
path: ../tests/Doubles/ExtendedTestHandler.php

-
message: "#^Method Tests\\\\OriNette\\\\Monolog\\\\Doubles\\\\TestLogger\\:\\:log\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#"
count: 1
path: ../tests/Doubles/TestLogger.php

-
message: "#^Property Tests\\\\OriNette\\\\Monolog\\\\Doubles\\\\TestMailer\\:\\:\\$mails type has no value type specified in iterable type array\\.$#"
count: 1
Expand Down

0 comments on commit 6e552d7

Please sign in to comment.