@@ -37,9 +37,9 @@ |
||
| 37 | 37 | |
| 38 | 38 | foreach ($channels as $channel) { |
| 39 | 39 | try { |
| 40 | - $def = $container->getDefinition('app' === $channel ? 'monolog.logger' : 'monolog.logger.'.$channel); |
|
| 40 | + $def = $container->getDefinition('app' === $channel ? 'monolog.logger' : 'monolog.logger.' . $channel); |
|
| 41 | 41 | } catch (InvalidArgumentException $e) { |
| 42 | - $msg = 'NewRelicBundle configuration error: The logging channel "'.$channel.'" does not exist.'; |
|
| 42 | + $msg = 'NewRelicBundle configuration error: The logging channel "' . $channel . '" does not exist.'; |
|
| 43 | 43 | |
| 44 | 44 | throw new \InvalidArgumentException($msg, 0, $e); |
| 45 | 45 | } |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | $configuration = new Configuration(); |
| 45 | 45 | $config = $this->processConfiguration($configuration, $configs); |
| 46 | 46 | |
| 47 | - $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
| 47 | + $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
| 48 | 48 | $loader->load('services.xml'); |
| 49 | 49 | |
| 50 | 50 | $container->setAlias(NewRelicInteractorInterface::class, $this->getInteractorServiceId($config))->setPublic(false); |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | ->setDecoratedService(NewRelicInteractorInterface::class) |
| 56 | 56 | ->setArguments( |
| 57 | 57 | [ |
| 58 | - '$interactor' => new Reference(LoggingInteractorDecorator::class.'.inner'), |
|
| 58 | + '$interactor' => new Reference(LoggingInteractorDecorator::class . '.inner'), |
|
| 59 | 59 | '$logger' => new Reference('logger', ContainerInterface::NULL_ON_INVALID_REFERENCE), |
| 60 | 60 | ] |
| 61 | 61 | ) |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | $container->findDefinition('ekino.new_relic.logs_handler') |
| 133 | 133 | ->setArguments( |
| 134 | 134 | [ |
| 135 | - '$level' => \is_int($level) ? $level : \constant('Monolog\Logger::'.\strtoupper($level)), |
|
| 135 | + '$level' => \is_int($level) ? $level : \constant('Monolog\Logger::' . \strtoupper($level)), |
|
| 136 | 136 | '$appName' => $config['application_name'], |
| 137 | 137 | ] |
| 138 | 138 | ); |
@@ -38,10 +38,10 @@ discard block |
||
| 38 | 38 | ->prototype('scalar') |
| 39 | 39 | ->end() |
| 40 | 40 | ->beforeNormalization() |
| 41 | - ->ifTrue(function ($v) { |
|
| 41 | + ->ifTrue(function($v) { |
|
| 42 | 42 | return !\is_array($v); |
| 43 | 43 | }) |
| 44 | - ->then(function ($v) { |
|
| 44 | + ->then(function($v) { |
|
| 45 | 45 | return \array_values(\array_filter(\explode(';', (string) $v))); |
| 46 | 46 | }) |
| 47 | 47 | ->end() |
@@ -61,10 +61,10 @@ discard block |
||
| 61 | 61 | ->prototype('scalar') |
| 62 | 62 | ->end() |
| 63 | 63 | ->beforeNormalization() |
| 64 | - ->ifTrue(function ($v) { |
|
| 64 | + ->ifTrue(function($v) { |
|
| 65 | 65 | return !\is_array($v); |
| 66 | 66 | }) |
| 67 | - ->then(function ($v) { |
|
| 67 | + ->then(function($v) { |
|
| 68 | 68 | return (array) $v; |
| 69 | 69 | }) |
| 70 | 70 | ->end() |
@@ -89,10 +89,10 @@ discard block |
||
| 89 | 89 | ->prototype('scalar') |
| 90 | 90 | ->end() |
| 91 | 91 | ->beforeNormalization() |
| 92 | - ->ifTrue(function ($v) { |
|
| 92 | + ->ifTrue(function($v) { |
|
| 93 | 93 | return !\is_array($v); |
| 94 | 94 | }) |
| 95 | - ->then(function ($v) { |
|
| 95 | + ->then(function($v) { |
|
| 96 | 96 | return (array) $v; |
| 97 | 97 | }) |
| 98 | 98 | ->end() |
@@ -101,10 +101,10 @@ discard block |
||
| 101 | 101 | ->prototype('scalar') |
| 102 | 102 | ->end() |
| 103 | 103 | ->beforeNormalization() |
| 104 | - ->ifTrue(function ($v) { |
|
| 104 | + ->ifTrue(function($v) { |
|
| 105 | 105 | return !\is_array($v); |
| 106 | 106 | }) |
| 107 | - ->then(function ($v) { |
|
| 107 | + ->then(function($v) { |
|
| 108 | 108 | return (array) $v; |
| 109 | 109 | }) |
| 110 | 110 | ->end() |
@@ -123,26 +123,26 @@ discard block |
||
| 123 | 123 | ->canBeUnset() |
| 124 | 124 | ->beforeNormalization() |
| 125 | 125 | ->ifString() |
| 126 | - ->then(function ($v) { |
|
| 126 | + ->then(function($v) { |
|
| 127 | 127 | return ['elements' => [$v]]; |
| 128 | 128 | }) |
| 129 | 129 | ->end() |
| 130 | 130 | ->beforeNormalization() |
| 131 | - ->ifTrue(function ($v) { |
|
| 131 | + ->ifTrue(function($v) { |
|
| 132 | 132 | return \is_array($v) && \is_numeric(\key($v)); |
| 133 | 133 | }) |
| 134 | - ->then(function ($v) { |
|
| 134 | + ->then(function($v) { |
|
| 135 | 135 | return ['elements' => $v]; |
| 136 | 136 | }) |
| 137 | 137 | ->end() |
| 138 | 138 | ->validate() |
| 139 | - ->ifTrue(function ($v) { |
|
| 139 | + ->ifTrue(function($v) { |
|
| 140 | 140 | return empty($v); |
| 141 | 141 | }) |
| 142 | 142 | ->thenUnset() |
| 143 | 143 | ->end() |
| 144 | 144 | ->validate() |
| 145 | - ->always(function ($v) { |
|
| 145 | + ->always(function($v) { |
|
| 146 | 146 | $isExclusive = null; |
| 147 | 147 | if (isset($v['type'])) { |
| 148 | 148 | $isExclusive = 'exclusive' === $v['type']; |