@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | $logger = $factory->getLogger(); |
| 56 | 56 | |
| 57 | 57 | $this->container->bind(ConfiguratorInterface::class, new ConfigManager( |
| 58 | - new class() implements LoaderInterface { |
|
| 58 | + new class() implements LoaderInterface{ |
|
| 59 | 59 | public function has(string $section): bool |
| 60 | 60 | { |
| 61 | 61 | return false; |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | $factory = new LogFactory(new MonologConfig([]), new ListenerRegistry(), new Container()); |
| 84 | 84 | |
| 85 | 85 | $this->container->bind(ConfiguratorInterface::class, new ConfigManager( |
| 86 | - new class() implements LoaderInterface { |
|
| 86 | + new class() implements LoaderInterface{ |
|
| 87 | 87 | public function has(string $section): bool |
| 88 | 88 | { |
| 89 | 89 | return false; |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | $this->container->get(StrategyBasedBootloadManager::class)->bootload([MonologBootloader::class]); |
| 103 | 103 | $this->container->bind(LogFactory::class, $factory); |
| 104 | 104 | |
| 105 | - $this->container->invoke(function (#[LoggerChannel('foo')] LoggerInterface $logger) { |
|
| 105 | + $this->container->invoke(function (#[LoggerChannel('foo')] LoggerInterface $logger){ |
|
| 106 | 106 | $this->assertSame('foo', $logger->getName()); |
| 107 | 107 | }); |
| 108 | 108 | } |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | public function testFinalizerShouldResetDefaultLogger() |
| 111 | 111 | { |
| 112 | 112 | $this->container->bind(ConfiguratorInterface::class, new ConfigManager( |
| 113 | - new class() implements LoaderInterface { |
|
| 113 | + new class() implements LoaderInterface{ |
|
| 114 | 114 | public function has(string $section): bool |
| 115 | 115 | { |
| 116 | 116 | return false; |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | public function testFinalizerShouldNotResetLoggerWhenApplicationTerminating() |
| 151 | 151 | { |
| 152 | 152 | $this->container->bind(ConfiguratorInterface::class, new ConfigManager( |
| 153 | - new class() implements LoaderInterface { |
|
| 153 | + new class() implements LoaderInterface{ |
|
| 154 | 154 | public function has(string $section): bool |
| 155 | 155 | { |
| 156 | 156 | return false; |
@@ -55,7 +55,8 @@ discard block |
||
| 55 | 55 | $logger = $factory->getLogger(); |
| 56 | 56 | |
| 57 | 57 | $this->container->bind(ConfiguratorInterface::class, new ConfigManager( |
| 58 | - new class() implements LoaderInterface { |
|
| 58 | + new class() implements LoaderInterface |
|
| 59 | + { |
|
| 59 | 60 | public function has(string $section): bool |
| 60 | 61 | { |
| 61 | 62 | return false; |
@@ -83,7 +84,8 @@ discard block |
||
| 83 | 84 | $factory = new LogFactory(new MonologConfig([]), new ListenerRegistry(), new Container()); |
| 84 | 85 | |
| 85 | 86 | $this->container->bind(ConfiguratorInterface::class, new ConfigManager( |
| 86 | - new class() implements LoaderInterface { |
|
| 87 | + new class() implements LoaderInterface |
|
| 88 | + { |
|
| 87 | 89 | public function has(string $section): bool |
| 88 | 90 | { |
| 89 | 91 | return false; |
@@ -102,7 +104,8 @@ discard block |
||
| 102 | 104 | $this->container->get(StrategyBasedBootloadManager::class)->bootload([MonologBootloader::class]); |
| 103 | 105 | $this->container->bind(LogFactory::class, $factory); |
| 104 | 106 | |
| 105 | - $this->container->invoke(function (#[LoggerChannel('foo')] LoggerInterface $logger) { |
|
| 107 | + $this->container->invoke(function (#[LoggerChannel('foo')] LoggerInterface $logger) |
|
| 108 | + { |
|
| 106 | 109 | $this->assertSame('foo', $logger->getName()); |
| 107 | 110 | }); |
| 108 | 111 | } |
@@ -110,7 +113,8 @@ discard block |
||
| 110 | 113 | public function testFinalizerShouldResetDefaultLogger() |
| 111 | 114 | { |
| 112 | 115 | $this->container->bind(ConfiguratorInterface::class, new ConfigManager( |
| 113 | - new class() implements LoaderInterface { |
|
| 116 | + new class() implements LoaderInterface |
|
| 117 | + { |
|
| 114 | 118 | public function has(string $section): bool |
| 115 | 119 | { |
| 116 | 120 | return false; |
@@ -150,7 +154,8 @@ discard block |
||
| 150 | 154 | public function testFinalizerShouldNotResetLoggerWhenApplicationTerminating() |
| 151 | 155 | { |
| 152 | 156 | $this->container->bind(ConfiguratorInterface::class, new ConfigManager( |
| 153 | - new class() implements LoaderInterface { |
|
| 157 | + new class() implements LoaderInterface |
|
| 158 | + { |
|
| 154 | 159 | public function has(string $section): bool |
| 155 | 160 | { |
| 156 | 161 | return false; |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | |
| 49 | 49 | public function testInjection(): void |
| 50 | 50 | { |
| 51 | - $factory = new class () implements LogsInterface { |
|
| 51 | + $factory = new class () implements LogsInterface{ |
|
| 52 | 52 | public function getLogger(string $channel): LoggerInterface |
| 53 | 53 | { |
| 54 | 54 | $mock = \Mockery::mock(LoggerInterface::class); |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | |
| 66 | 66 | public function testInjectionNullableChannel(): void |
| 67 | 67 | { |
| 68 | - $factory = new class () implements LogsInterface { |
|
| 68 | + $factory = new class () implements LogsInterface{ |
|
| 69 | 69 | public function getLogger(?string $channel): LoggerInterface |
| 70 | 70 | { |
| 71 | 71 | $mock = \Mockery::mock(LoggerInterface::class); |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | |
| 83 | 83 | public function testInjectionWithAttribute(): void |
| 84 | 84 | { |
| 85 | - $factory = new class () implements LogsInterface { |
|
| 85 | + $factory = new class () implements LogsInterface{ |
|
| 86 | 86 | public function getLogger(?string $channel): LoggerInterface |
| 87 | 87 | { |
| 88 | 88 | $mock = \Mockery::mock(LoggerInterface::class); |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | $this->container->get(StrategyBasedBootloadManager::class)->bootload([LoggerBootloader::class]); |
| 94 | 94 | $this->container->bindSingleton(LogsInterface::class, $factory); |
| 95 | 95 | |
| 96 | - $this->container->invoke(function (#[LoggerChannel('foo')] LoggerInterface $logger) { |
|
| 96 | + $this->container->invoke(function (#[LoggerChannel('foo')] LoggerInterface $logger){ |
|
| 97 | 97 | $this->assertSame('foo', $logger->getName()); |
| 98 | 98 | }); |
| 99 | 99 | } |
@@ -48,7 +48,8 @@ discard block |
||
| 48 | 48 | |
| 49 | 49 | public function testInjection(): void |
| 50 | 50 | { |
| 51 | - $factory = new class () implements LogsInterface { |
|
| 51 | + $factory = new class () implements LogsInterface |
|
| 52 | + { |
|
| 52 | 53 | public function getLogger(string $channel): LoggerInterface |
| 53 | 54 | { |
| 54 | 55 | $mock = \Mockery::mock(LoggerInterface::class); |
@@ -65,7 +66,8 @@ discard block |
||
| 65 | 66 | |
| 66 | 67 | public function testInjectionNullableChannel(): void |
| 67 | 68 | { |
| 68 | - $factory = new class () implements LogsInterface { |
|
| 69 | + $factory = new class () implements LogsInterface |
|
| 70 | + { |
|
| 69 | 71 | public function getLogger(?string $channel): LoggerInterface |
| 70 | 72 | { |
| 71 | 73 | $mock = \Mockery::mock(LoggerInterface::class); |
@@ -82,7 +84,8 @@ discard block |
||
| 82 | 84 | |
| 83 | 85 | public function testInjectionWithAttribute(): void |
| 84 | 86 | { |
| 85 | - $factory = new class () implements LogsInterface { |
|
| 87 | + $factory = new class () implements LogsInterface |
|
| 88 | + { |
|
| 86 | 89 | public function getLogger(?string $channel): LoggerInterface |
| 87 | 90 | { |
| 88 | 91 | $mock = \Mockery::mock(LoggerInterface::class); |
@@ -93,7 +96,8 @@ discard block |
||
| 93 | 96 | $this->container->get(StrategyBasedBootloadManager::class)->bootload([LoggerBootloader::class]); |
| 94 | 97 | $this->container->bindSingleton(LogsInterface::class, $factory); |
| 95 | 98 | |
| 96 | - $this->container->invoke(function (#[LoggerChannel('foo')] LoggerInterface $logger) { |
|
| 99 | + $this->container->invoke(function (#[LoggerChannel('foo')] LoggerInterface $logger) |
|
| 100 | + { |
|
| 97 | 101 | $this->assertSame('foo', $logger->getName()); |
| 98 | 102 | }); |
| 99 | 103 | } |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | public function __construct( |
| 20 | 20 | callable $receptor, |
| 21 | 21 | private readonly string $channel |
| 22 | - ) { |
|
| 22 | + ){ |
|
| 23 | 23 | $this->receptor = $receptor(...); |
| 24 | 24 | } |
| 25 | 25 | |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | |
| 21 | 21 | public function __construct( |
| 22 | 22 | private readonly LogsInterface $factory, |
| 23 | - ) { |
|
| 23 | + ){ |
|
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | /** |
@@ -28,11 +28,11 @@ discard block |
||
| 28 | 28 | */ |
| 29 | 29 | public function createInjection( |
| 30 | 30 | \ReflectionClass $class, |
| 31 | - \ReflectionParameter|null|string $context = null, |
|
| 31 | + \ReflectionParameter | null | string $context = null, |
|
| 32 | 32 | ): LoggerInterface { |
| 33 | 33 | $channel = \is_object($context) ? $this->extractChannelAttribute($context) : null; |
| 34 | 34 | |
| 35 | - if ($channel === null) { |
|
| 35 | + if ($channel === null){ |
|
| 36 | 36 | /** |
| 37 | 37 | * Array of flags to check if the logger allows null argument |
| 38 | 38 | * |
@@ -32,7 +32,8 @@ |
||
| 32 | 32 | ): LoggerInterface { |
| 33 | 33 | $channel = \is_object($context) ? $this->extractChannelAttribute($context) : null; |
| 34 | 34 | |
| 35 | - if ($channel === null) { |
|
| 35 | + if ($channel === null) |
|
| 36 | + { |
|
| 36 | 37 | /** |
| 37 | 38 | * Array of flags to check if the logger allows null argument |
| 38 | 39 | * |