| @@ -54,7 +54,7 @@ discard block | ||
| 54 | 54 | $logger = $factory->getLogger(); | 
| 55 | 55 | |
| 56 | 56 | $this->container->bind(ConfiguratorInterface::class, new ConfigManager( | 
| 57 | -            new class() implements LoaderInterface { | |
| 57 | +            new class() implements LoaderInterface{ | |
| 58 | 58 | public function has(string $section): bool | 
| 59 | 59 |                  { | 
| 60 | 60 | return false; | 
| @@ -80,7 +80,7 @@ discard block | ||
| 80 | 80 | public function testFinalizerShouldResetDefaultLogger() | 
| 81 | 81 |      { | 
| 82 | 82 | $this->container->bind(ConfiguratorInterface::class, new ConfigManager( | 
| 83 | -            new class() implements LoaderInterface { | |
| 83 | +            new class() implements LoaderInterface{ | |
| 84 | 84 | public function has(string $section): bool | 
| 85 | 85 |                  { | 
| 86 | 86 | return false; | 
| @@ -120,7 +120,7 @@ discard block | ||
| 120 | 120 | public function testFinalizerShouldNotResetLoggerWhenApplicationTerminating() | 
| 121 | 121 |      { | 
| 122 | 122 | $this->container->bind(ConfiguratorInterface::class, new ConfigManager( | 
| 123 | -            new class() implements LoaderInterface { | |
| 123 | +            new class() implements LoaderInterface{ | |
| 124 | 124 | public function has(string $section): bool | 
| 125 | 125 |                  { | 
| 126 | 126 | return false; | 
| @@ -31,7 +31,7 @@ discard block | ||
| 31 | 31 |          $finalizer->shouldReceive('addFinalizer')->once(); | 
| 32 | 32 | |
| 33 | 33 | $this->container->bind(ConfiguratorInterface::class, new ConfigManager( | 
| 34 | -            new class() implements LoaderInterface { | |
| 34 | +            new class() implements LoaderInterface{ | |
| 35 | 35 | public function has(string $section): bool | 
| 36 | 36 |                  { | 
| 37 | 37 | return false; | 
| @@ -165,7 +165,7 @@ discard block | ||
| 165 | 165 |          return $this->container->get(LogsInterface::class)->getLogger('test'); | 
| 166 | 166 | } | 
| 167 | 167 | |
| 168 | - protected function createLogRecord(int $level): array|LogRecord | |
| 168 | + protected function createLogRecord(int $level): array | LogRecord | |
| 169 | 169 |      { | 
| 170 | 170 | return Logger::API === 2 | 
| 171 | 171 | ? ['level' => $level] | 
| @@ -37,28 +37,28 @@ discard block | ||
| 37 | 37 | public function __construct( | 
| 38 | 38 | private readonly ConfiguratorInterface $config, | 
| 39 | 39 | private readonly EnvironmentInterface $env, | 
| 40 | -    ) { | |
| 40 | +    ){ | |
| 41 | 41 | } | 
| 42 | 42 | |
| 43 | 43 | public function init(Container $container, FinalizerInterface $finalizer): void | 
| 44 | 44 |      { | 
| 45 | 45 |          $finalizer->addFinalizer(static function (bool $terminate) use ($container): void { | 
| 46 | -            if ($terminate) { | |
| 46 | +            if ($terminate){ | |
| 47 | 47 | return; | 
| 48 | 48 | } | 
| 49 | 49 | |
| 50 | -            if ($container->hasInstance(LoggerInterface::class)) { | |
| 50 | +            if ($container->hasInstance(LoggerInterface::class)){ | |
| 51 | 51 | $logger = $container->get(LoggerInterface::class); | 
| 52 | 52 | |
| 53 | -                if ($logger instanceof ResettableInterface) { | |
| 53 | +                if ($logger instanceof ResettableInterface){ | |
| 54 | 54 | $logger->reset(); | 
| 55 | 55 | } | 
| 56 | 56 | } | 
| 57 | 57 | |
| 58 | -            if ($container->hasInstance(LogsInterface::class)) { | |
| 58 | +            if ($container->hasInstance(LogsInterface::class)){ | |
| 59 | 59 | $factory = $container->get(LogsInterface::class); | 
| 60 | 60 | |
| 61 | -                if ($factory instanceof ResettableInterface) { | |
| 61 | +                if ($factory instanceof ResettableInterface){ | |
| 62 | 62 | $factory->reset(); | 
| 63 | 63 | } | 
| 64 | 64 | } | 
| @@ -75,14 +75,14 @@ discard block | ||
| 75 | 75 | |
| 76 | 76 | public function addHandler(string $channel, HandlerInterface $handler): void | 
| 77 | 77 |      { | 
| 78 | -        if (!isset($this->config->getConfig(MonologConfig::CONFIG)['handlers'][$channel])) { | |
| 78 | +        if (!isset($this->config->getConfig(MonologConfig::CONFIG)['handlers'][$channel])){ | |
| 79 | 79 |              $this->config->modify(MonologConfig::CONFIG, new Append('handlers', $channel, [])); | 
| 80 | 80 | } | 
| 81 | 81 | |
| 82 | 82 | $this->config->modify( | 
| 83 | 83 | MonologConfig::CONFIG, | 
| 84 | 84 | new Append( | 
| 85 | - 'handlers.' . $channel, | |
| 85 | + 'handlers.'.$channel, | |
| 86 | 86 | null, | 
| 87 | 87 | $handler | 
| 88 | 88 | ) | 
| @@ -91,7 +91,7 @@ discard block | ||
| 91 | 91 | |
| 92 | 92 | public function logRotate( | 
| 93 | 93 | string $filename, | 
| 94 | - int|Level $level = Logger::DEBUG, | |
| 94 | + int | Level $level = Logger::DEBUG, | |
| 95 | 95 | int $maxFiles = 0, | 
| 96 | 96 | bool $bubble = true | 
| 97 | 97 |      ): HandlerInterface { | 
| @@ -13,12 +13,12 @@ discard block | ||
| 13 | 13 |  { | 
| 14 | 14 | public function __construct( | 
| 15 | 15 | private readonly ContainerInterface $container | 
| 16 | -    ) { | |
| 16 | +    ){ | |
| 17 | 17 | } | 
| 18 | 18 | |
| 19 | - public function __invoke(LogRecord|array $record): array | |
| 19 | + public function __invoke(LogRecord | array $record): array | |
| 20 | 20 |      { | 
| 21 | -        if ($record instanceof LogRecord) { | |
| 21 | +        if ($record instanceof LogRecord){ | |
| 22 | 22 | $record = $record->toArray(); | 
| 23 | 23 | } | 
| 24 | 24 | |
| @@ -27,7 +27,7 @@ discard block | ||
| 27 | 27 | |
| 28 | 28 | $context = $tracer->getContext(); | 
| 29 | 29 | |
| 30 | -        if (!empty($context)) { | |
| 30 | +        if (!empty($context)){ | |
| 31 | 31 | $record['extra']['telemetry'] = $context; | 
| 32 | 32 | } | 
| 33 | 33 | |
| @@ -18,7 +18,8 @@ discard block | ||
| 18 | 18 | |
| 19 | 19 | public function __invoke(LogRecord|array $record): array | 
| 20 | 20 |      { | 
| 21 | -        if ($record instanceof LogRecord) { | |
| 21 | + if ($record instanceof LogRecord) | |
| 22 | +        { | |
| 22 | 23 | $record = $record->toArray(); | 
| 23 | 24 | } | 
| 24 | 25 | |
| @@ -27,7 +28,8 @@ discard block | ||
| 27 | 28 | |
| 28 | 29 | $context = $tracer->getContext(); | 
| 29 | 30 | |
| 30 | -        if (!empty($context)) { | |
| 31 | + if (!empty($context)) | |
| 32 | +        { | |
| 31 | 33 | $record['extra']['telemetry'] = $context; | 
| 32 | 34 | } | 
| 33 | 35 | |
| @@ -16,11 +16,11 @@ discard block | ||
| 16 | 16 | private readonly ListenerRegistryInterface $listenerRegistry, | 
| 17 | 17 | int $level = Logger::DEBUG, | 
| 18 | 18 | bool $bubble = true | 
| 19 | -    ) { | |
| 19 | +    ){ | |
| 20 | 20 | parent::__construct($level, $bubble); | 
| 21 | 21 | } | 
| 22 | 22 | |
| 23 | - public function handle(array|LogRecord $record): bool | |
| 23 | + public function handle(array | LogRecord $record): bool | |
| 24 | 24 |      { | 
| 25 | 25 | $e = new LogEvent( | 
| 26 | 26 | $record['datetime'], | 
| @@ -30,7 +30,7 @@ discard block | ||
| 30 | 30 | $record['context'] | 
| 31 | 31 | ); | 
| 32 | 32 | |
| 33 | -        foreach ($this->listenerRegistry->getListeners() as $listener) { | |
| 33 | +        foreach ($this->listenerRegistry->getListeners() as $listener){ | |
| 34 | 34 | $listener($e); | 
| 35 | 35 | } | 
| 36 | 36 | |