| @@ -27,7 +27,7 @@ discard block | ||
| 27 | 27 | |
| 28 | 28 | $listener = new DeprecationListener($interactor); | 
| 29 | 29 | |
| 30 | -        \set_error_handler(function () { | |
| 30 | +        \set_error_handler(function() { | |
| 31 | 31 | return false; | 
| 32 | 32 | }); | 
| 33 | 33 | |
| @@ -47,7 +47,7 @@ discard block | ||
| 47 | 47 | |
| 48 | 48 | $listener = new DeprecationListener($interactor); | 
| 49 | 49 | |
| 50 | -        \set_error_handler(function () { | |
| 50 | +        \set_error_handler(function() { | |
| 51 | 51 | return false; | 
| 52 | 52 | }); | 
| 53 | 53 | $e = \error_reporting(0); | 
| @@ -69,7 +69,7 @@ discard block | ||
| 69 | 69 | |
| 70 | 70 | $listener = new DeprecationListener($interactor); | 
| 71 | 71 | |
| 72 | -        \set_error_handler(function () { | |
| 72 | +        \set_error_handler(function() { | |
| 73 | 73 | return false; | 
| 74 | 74 | }); | 
| 75 | 75 | |
| @@ -110,7 +110,7 @@ discard block | ||
| 110 | 110 | |
| 111 | 111 | $listener = new DeprecationListener($interactor); | 
| 112 | 112 | |
| 113 | -        \set_error_handler(function () { | |
| 113 | +        \set_error_handler(function() { | |
| 114 | 114 | return false; | 
| 115 | 115 | }); | 
| 116 | 116 | |
| @@ -50,7 +50,7 @@ discard block | ||
| 50 | 50 | continue; | 
| 51 | 51 | } | 
| 52 | 52 | |
| 53 | -            $arguments = \array_map(function (\ReflectionParameter $parameter) { | |
| 53 | +            $arguments = \array_map(function(\ReflectionParameter $parameter) { | |
| 54 | 54 | return $this->getTypeStub($parameter->getType()); | 
| 55 | 55 | }, $method->getParameters()); | 
| 56 | 56 | |
| @@ -80,12 +80,12 @@ discard block | ||
| 80 | 80 | case 'Throwable': | 
| 81 | 81 | return new \Exception(); | 
| 82 | 82 | case 'callable': | 
| 83 | -                return function () { | |
| 83 | +                return function() { | |
| 84 | 84 | }; | 
| 85 | 85 | case 'array': | 
| 86 | 86 |                  return \array_fill(0, 2, \uniqid('', true)); | 
| 87 | 87 | default: | 
| 88 | -                throw new \UnexpectedValueException('Unknow type. '.$type->getName()); | |
| 88 | +                throw new \UnexpectedValueException('Unknow type. ' . $type->getName()); | |
| 89 | 89 | } | 
| 90 | 90 | } | 
| 91 | 91 | } | 
| @@ -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']; |