@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace leinonen\Yii2Monolog; |
6 | 6 | |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | */ |
70 | 70 | public function export() |
71 | 71 | { |
72 | - $this->getMessages()->each(function (Yii2LogMessage $message) { |
|
72 | + $this->getMessages()->each(function(Yii2LogMessage $message) { |
|
73 | 73 | $this->logger->log($message->getPsr3LogLevel(), $message->getMessage(), $message->getContext()); |
74 | 74 | }); |
75 | 75 | } |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | */ |
106 | 106 | private function getMessages(): Collection |
107 | 107 | { |
108 | - return collect($this->messages)->map(function ($message) { |
|
108 | + return collect($this->messages)->map(function($message) { |
|
109 | 109 | return new Yii2LogMessage($message); |
110 | 110 | }); |
111 | 111 | } |
@@ -59,7 +59,8 @@ |
||
59 | 59 | }); |
60 | 60 | } |
61 | 61 | |
62 | - public function setChannel(string $channel) { |
|
62 | + public function setChannel(string $channel) |
|
63 | + { |
|
63 | 64 | $this->channel = $channel; |
64 | 65 | } |
65 | 66 |
@@ -8,7 +8,6 @@ |
||
8 | 8 | use Monolog\Logger; |
9 | 9 | use Psr\Log\LoggerInterface; |
10 | 10 | use Yii; |
11 | -use yii\base\Application; |
|
12 | 11 | use yii\base\BootstrapInterface; |
13 | 12 | use yii\base\Component; |
14 | 13 |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | $handlers = $channelConfiguration['handlers'] ?? []; |
100 | 100 | $processors = $channelConfiguration['processors'] ?? []; |
101 | 101 | |
102 | - $this->loggerRegistry->registerLogChannel($channelName, function () use ($channelName, $handlers, $processors) { |
|
102 | + $this->loggerRegistry->registerLogChannel($channelName, function() use ($channelName, $handlers, $processors) { |
|
103 | 103 | return $this->monologFactory->make($channelName, $handlers, $processors); |
104 | 104 | }); |
105 | 105 | } |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | */ |
111 | 111 | private function registerPsrLogger() |
112 | 112 | { |
113 | - $this->loggerRegistry->registerPsrLogger(function () { |
|
113 | + $this->loggerRegistry->registerPsrLogger(function() { |
|
114 | 114 | return $this->getLogger($this->getMainChannel()); |
115 | 115 | }); |
116 | 116 | } |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace leinonen\Yii2Monolog; |
6 | 6 | |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | { |
35 | 35 | $serviceName = $this->getLoggerAlias($channelName); |
36 | 36 | |
37 | - Yii::$container->setSingleton($serviceName, function () use ($channelName, $loggerCreationCallable) { |
|
37 | + Yii::$container->setSingleton($serviceName, function() use ($channelName, $loggerCreationCallable) { |
|
38 | 38 | return $loggerCreationCallable($channelName); |
39 | 39 | }); |
40 | 40 | } |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | */ |
47 | 47 | public function registerPsrLogger(callable $loggerCreationCallable) |
48 | 48 | { |
49 | - Yii::$container->setSingleton(LoggerInterface::class, function () use ($loggerCreationCallable) { |
|
49 | + Yii::$container->setSingleton(LoggerInterface::class, function() use ($loggerCreationCallable) { |
|
50 | 50 | return $loggerCreationCallable(); |
51 | 51 | }); |
52 | 52 | } |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace leinonen\Yii2Monolog\CreationStrategies; |
6 | 6 | |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | */ |
40 | 40 | public function getConfigurationCallable(array $config): callable |
41 | 41 | { |
42 | - return $config['configure'] ?? function ($instance) { |
|
42 | + return $config['configure'] ?? function($instance) { |
|
43 | 43 | return $instance; |
44 | 44 | }; |
45 | 45 | } |