@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | namespace WShafer\PSR11MonoLog\Handler; |
5 | 5 | |
@@ -16,10 +16,10 @@ discard block |
||
16 | 16 | public function __invoke(array $options) |
17 | 17 | { |
18 | 18 | $client = $this->getClient($options); |
19 | - $key = (string) ($options['key'] ?? ''); |
|
20 | - $level = (int) ($options['level'] ?? Logger::DEBUG); |
|
19 | + $key = (string) ($options['key'] ?? ''); |
|
20 | + $level = (int) ($options['level'] ?? Logger::DEBUG); |
|
21 | 21 | $bubble = (boolean) ($options['bubble'] ?? true); |
22 | - $capSize = (int) ($options['capSize'] ?? 0); |
|
22 | + $capSize = (int) ($options['capSize'] ?? 0); |
|
23 | 23 | |
24 | 24 | return new RedisHandler( |
25 | 25 | $client, |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | namespace WShafer\PSR11MonoLog\Handler; |
5 | 5 | |
@@ -16,9 +16,9 @@ discard block |
||
16 | 16 | public function __invoke(array $options) |
17 | 17 | { |
18 | 18 | $client = $this->getClient($options); |
19 | - $database = (string) ($options['database'] ?? ''); |
|
20 | - $collection = (string) ($options['collection'] ?? ''); |
|
21 | - $level = (int) ($options['level'] ?? Logger::DEBUG); |
|
19 | + $database = (string) ($options['database'] ?? ''); |
|
20 | + $collection = (string) ($options['collection'] ?? ''); |
|
21 | + $level = (int) ($options['level'] ?? Logger::DEBUG); |
|
22 | 22 | $bubble = (boolean) ($options['bubble'] ?? true); |
23 | 23 | |
24 | 24 | return new MongoDBHandler( |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | namespace WShafer\PSR11MonoLog\Handler; |
5 | 5 | |
@@ -11,12 +11,12 @@ discard block |
||
11 | 11 | { |
12 | 12 | public function __invoke(array $options) |
13 | 13 | { |
14 | - $host = (string) ($options['host'] ?? 'localhost'); |
|
15 | - $port = (int) ($options['port'] ?? 5984); |
|
16 | - $dbname = (string) ($options['port'] ?? 'logger'); |
|
17 | - $userName = (string) ($options['username'] ?? ''); |
|
18 | - $password = (string) ($options['password'] ?? ''); |
|
19 | - $level = (int) ($options['level'] ?? Logger::DEBUG); |
|
14 | + $host = (string) ($options['host'] ?? 'localhost'); |
|
15 | + $port = (int) ($options['port'] ?? 5984); |
|
16 | + $dbname = (string) ($options['port'] ?? 'logger'); |
|
17 | + $userName = (string) ($options['username'] ?? ''); |
|
18 | + $password = (string) ($options['password'] ?? ''); |
|
19 | + $level = (int) ($options['level'] ?? Logger::DEBUG); |
|
20 | 20 | $bubble = (boolean) ($options['bubble'] ?? true); |
21 | 21 | |
22 | 22 | return new CouchDBHandler( |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | namespace WShafer\PSR11MonoLog\Handler; |
5 | 5 | |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | public function __invoke(array $options) |
17 | 17 | { |
18 | 18 | $client = $this->getClient($options); |
19 | - $level = (int) ($options['level'] ?? Logger::DEBUG); |
|
19 | + $level = (int) ($options['level'] ?? Logger::DEBUG); |
|
20 | 20 | $bubble = (boolean) ($options['bubble'] ?? true); |
21 | 21 | |
22 | 22 | return new DoctrineCouchDBHandler( |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | namespace WShafer\PSR11MonoLog\Handler; |
5 | 5 | |
@@ -16,10 +16,10 @@ discard block |
||
16 | 16 | public function __invoke(array $options) |
17 | 17 | { |
18 | 18 | $client = $this->getClient($options); |
19 | - $index = (string) ($options['index'] ?? 'monolog'); |
|
20 | - $type = (string) ($options['type'] ?? 'record'); |
|
19 | + $index = (string) ($options['index'] ?? 'monolog'); |
|
20 | + $type = (string) ($options['type'] ?? 'record'); |
|
21 | 21 | $ignoreError = (boolean) ($options['ignoreError'] ?? false); |
22 | - $level = (int) ($options['level'] ?? Logger::DEBUG); |
|
22 | + $level = (int) ($options['level'] ?? Logger::DEBUG); |
|
23 | 23 | $bubble = (boolean) ($options['bubble'] ?? true); |
24 | 24 | |
25 | 25 | return new ElasticSearchHandler( |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | namespace WShafer\PSR11MonoLog\Handler; |
5 | 5 | |
@@ -16,8 +16,8 @@ discard block |
||
16 | 16 | public function __invoke(array $options) |
17 | 17 | { |
18 | 18 | $client = $this->getClient($options); |
19 | - $table = (string) ($options['table'] ?? null); |
|
20 | - $level = (int) ($options['level'] ?? Logger::DEBUG); |
|
19 | + $table = (string) ($options['table'] ?? null); |
|
20 | + $level = (int) ($options['level'] ?? Logger::DEBUG); |
|
21 | 21 | $bubble = (boolean) ($options['bubble'] ?? true); |
22 | 22 | |
23 | 23 | return new DynamoDbHandler( |
@@ -95,6 +95,9 @@ |
||
95 | 95 | return $this->config->hasHandlerConfig($id); |
96 | 96 | } |
97 | 97 | |
98 | + /** |
|
99 | + * @param string $id |
|
100 | + */ |
|
98 | 101 | protected function getInstanceFromFactory($id) |
99 | 102 | { |
100 | 103 | $class = null; |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -declare(strict_types=1); |
|
2 | +declare(strict_types = 1); |
|
3 | 3 | |
4 | 4 | namespace WShafer\PSR11MonoLog\Exception; |
5 | 5 |
@@ -34,7 +34,7 @@ |
||
34 | 34 | /** @var HandlerInterface $handler */ |
35 | 35 | $handler = parent::get($id); |
36 | 36 | |
37 | - $formatter= $config->getFormatter(); |
|
37 | + $formatter = $config->getFormatter(); |
|
38 | 38 | |
39 | 39 | if ($formatter) { |
40 | 40 | $handler->setFormatter($this->getFormatter($formatter)); |