Skip to content

Commit a4a0f15

Browse files
authored
Add types to LoggerInterface
1 parent ee50630 commit a4a0f15

File tree

1 file changed

+5
-18
lines changed

1 file changed

+5
-18
lines changed

src/Logger/ElasticaLogger.php

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,9 @@
2424
*/
2525
class ElasticaLogger extends AbstractLogger
2626
{
27-
/**
28-
* @var LoggerInterface
29-
*/
30-
protected $logger;
31-
32-
/**
33-
* @var array
34-
*/
35-
protected $queries = [];
36-
37-
/**
38-
* @var bool
39-
*/
40-
protected $debug;
27+
protected ?LoggerInterface $logger;
28+
protected array $queries = [];
29+
protected bool $debug;
4130

4231
public function __construct(?LoggerInterface $logger = null, bool $debug = false)
4332
{
@@ -111,15 +100,13 @@ public function getQueries(): array
111100

112101
/**
113102
* {@inheritdoc}
114-
*
115-
* @return void
116103
*/
117-
public function log($level, $message, array $context = [])
104+
public function log($level, $message, array $context = []): void
118105
{
119106
$this->logger->log($level, $message, $context);
120107
}
121108

122-
public function reset()
109+
public function reset(): void
123110
{
124111
$this->queries = [];
125112
}

0 commit comments

Comments
 (0)