From d0a0c64d1e17d15bcdd0489c9401f1295d05b55d Mon Sep 17 00:00:00 2001 From: Oliwier Ptak Date: Fri, 4 Aug 2023 12:39:10 +0200 Subject: [PATCH] code style --- src/Logger/Builder/ConfiguratorValidator.php | 2 +- src/Logger/Builder/HandlerBuilder.php | 2 +- src/Logger/Builder/LoggerBuilder.php | 4 ++-- src/Logger/Builder/PluginBuilder.php | 2 +- src/Logger/EveronLoggerFactory.php | 2 +- .../stub/Plugin/Stream/HandlerExceptionLoggerPluginStub.php | 5 +---- tests/stub/Plugin/Stream/PluginExceptionLoggerPluginStub.php | 5 +---- tests/stub/Plugin/Stream/StreamLoggerPluginStub.php | 2 +- 8 files changed, 9 insertions(+), 15 deletions(-) diff --git a/src/Logger/Builder/ConfiguratorValidator.php b/src/Logger/Builder/ConfiguratorValidator.php index 82c0c7e..538e213 100644 --- a/src/Logger/Builder/ConfiguratorValidator.php +++ b/src/Logger/Builder/ConfiguratorValidator.php @@ -26,7 +26,7 @@ public function validate(LoggerConfiguratorInterface $configurator): void throw new ConfiguratorValidationException( $exception->getMessage(), $exception->getCode(), - $exception + $exception, ); } } diff --git a/src/Logger/Builder/HandlerBuilder.php b/src/Logger/Builder/HandlerBuilder.php index 01d2c8c..10fdf5c 100644 --- a/src/Logger/Builder/HandlerBuilder.php +++ b/src/Logger/Builder/HandlerBuilder.php @@ -34,7 +34,7 @@ public function buildHandler(LoggerPluginInterface $plugin): HandlerInterface 'Could not build handler for plugin: "%s". Error: %s', get_class($plugin), $exception->getMessage(), - ), $exception->getCode(), $exception + ), $exception->getCode(), $exception, ); } } diff --git a/src/Logger/Builder/LoggerBuilder.php b/src/Logger/Builder/LoggerBuilder.php index acc5752..846220c 100644 --- a/src/Logger/Builder/LoggerBuilder.php +++ b/src/Logger/Builder/LoggerBuilder.php @@ -39,7 +39,7 @@ public function buildLogger(): LoggerInterface $this->configurator->requireName(), $handlers, $processors, - new DateTimeZone($this->configurator->requireTimezone()) + new DateTimeZone($this->configurator->requireTimezone()), ); } @@ -105,7 +105,7 @@ protected function buildProcessors(): array 'Could not build processor: "%s". Error: %s', $processorClass, $exception->getMessage(), - ) + ), ); } } diff --git a/src/Logger/Builder/PluginBuilder.php b/src/Logger/Builder/PluginBuilder.php index bac9df3..edb74e2 100644 --- a/src/Logger/Builder/PluginBuilder.php +++ b/src/Logger/Builder/PluginBuilder.php @@ -33,7 +33,7 @@ public function buildPlugin(PluginConfiguratorInterface $pluginConfigurator): Lo 'Could not build plugin: "%s". Error: %s', $pluginConfigurator->requirePluginClass(), $exception->getMessage(), - ), $exception->getCode(), $exception + ), $exception->getCode(), $exception, ); } } diff --git a/src/Logger/EveronLoggerFactory.php b/src/Logger/EveronLoggerFactory.php index d2a1556..fb51950 100644 --- a/src/Logger/EveronLoggerFactory.php +++ b/src/Logger/EveronLoggerFactory.php @@ -16,7 +16,7 @@ public function createBuilderFromConfigurator(LoggerConfiguratorInterface $confi $configurator, $this->createPluginBuilder(), $this->createHandlerBuilder(), - $this->createValidator() + $this->createValidator(), ); } diff --git a/tests/stub/Plugin/Stream/HandlerExceptionLoggerPluginStub.php b/tests/stub/Plugin/Stream/HandlerExceptionLoggerPluginStub.php index 27a6b5b..8799304 100644 --- a/tests/stub/Plugin/Stream/HandlerExceptionLoggerPluginStub.php +++ b/tests/stub/Plugin/Stream/HandlerExceptionLoggerPluginStub.php @@ -27,8 +27,5 @@ public function buildHandler(): HandlerInterface throw new InvalidArgumentException('Invalid value for foo bar'); } - public function validate(): void - { - - } + public function validate(): void {} } diff --git a/tests/stub/Plugin/Stream/PluginExceptionLoggerPluginStub.php b/tests/stub/Plugin/Stream/PluginExceptionLoggerPluginStub.php index b6f6590..34f7974 100644 --- a/tests/stub/Plugin/Stream/PluginExceptionLoggerPluginStub.php +++ b/tests/stub/Plugin/Stream/PluginExceptionLoggerPluginStub.php @@ -22,10 +22,7 @@ public function canRun(): bool return true; } - public function buildHandler(): HandlerInterface - { - - } + public function buildHandler(): HandlerInterface {} public function validate(): void { diff --git a/tests/stub/Plugin/Stream/StreamLoggerPluginStub.php b/tests/stub/Plugin/Stream/StreamLoggerPluginStub.php index 32d0451..5616c9d 100644 --- a/tests/stub/Plugin/Stream/StreamLoggerPluginStub.php +++ b/tests/stub/Plugin/Stream/StreamLoggerPluginStub.php @@ -33,7 +33,7 @@ public function buildHandler(): HandlerInterface Logger::toMonologLevel($this->configurator->requireLogLevel()), $this->configurator->shouldBubble(), $this->configurator->getFilePermission(), - $this->configurator->useLocking() + $this->configurator->useLocking(), ); }