Skip to content

Commit c047da6

Browse files
authored
Apply code style fixes (#868)
1 parent a19653c commit c047da6

21 files changed

+36
-36
lines changed

src/Command/SentryTestCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function __construct(?HubInterface $hub = null)
2525
parent::__construct();
2626

2727
if (null === $hub) {
28-
@trigger_error(sprintf('Not passing an instance of the "%s" interface as argument of the constructor is deprecated since version 4.12 and will not work since version 5.0.', HubInterface::class), \E_USER_DEPRECATED);
28+
@trigger_error(\sprintf('Not passing an instance of the "%s" interface as argument of the constructor is deprecated since version 4.12 and will not work since version 5.0.', HubInterface::class), \E_USER_DEPRECATED);
2929
}
3030

3131
$this->hub = $hub ?? SentrySdk::getCurrentHub();

src/DependencyInjection/Compiler/DbalTracingPass.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ public function process(ContainerBuilder $container): void
4545
}
4646

4747
foreach ($connectionsToTrace as $connectionName) {
48-
if (!\in_array(sprintf(self::CONNECTION_SERVICE_NAME_FORMAT, $connectionName), $connections, true)) {
49-
throw new \InvalidArgumentException(sprintf('The Doctrine connection "%s" does not exists and cannot be instrumented.', $connectionName));
48+
if (!\in_array(\sprintf(self::CONNECTION_SERVICE_NAME_FORMAT, $connectionName), $connections, true)) {
49+
throw new \InvalidArgumentException(\sprintf('The Doctrine connection "%s" does not exists and cannot be instrumented.', $connectionName));
5050
}
5151

5252
if (class_exists(Result::class)) {
@@ -65,7 +65,7 @@ private function configureConnectionForDoctrineDBALVersion3(ContainerBuilder $co
6565

6666
private function configureConnectionForDoctrineDBALVersion2(ContainerBuilder $container, string $connectionName): void
6767
{
68-
$connectionDefinition = $container->getDefinition(sprintf(self::CONNECTION_SERVICE_NAME_FORMAT, $connectionName));
68+
$connectionDefinition = $container->getDefinition(\sprintf(self::CONNECTION_SERVICE_NAME_FORMAT, $connectionName));
6969
$connectionDefinition->setConfigurator([new Reference(ConnectionConfigurator::class), 'configure']);
7070
}
7171

src/ErrorTypesParser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ private static function convertErrorConstants(string $value): string
7575
}, $value);
7676

7777
if (null === $output) {
78-
throw new \InvalidArgumentException(sprintf('The "%s" value could not be parsed.', $value));
78+
throw new \InvalidArgumentException(\sprintf('The "%s" value could not be parsed.', $value));
7979
}
8080

8181
return $output;

src/EventListener/AbstractTracingRequestListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ protected function getRouteName(Request $request): string
6767
$route = $request->attributes->get('_controller');
6868

6969
if (\is_array($route) && \is_callable($route, true)) {
70-
$route = sprintf('%s::%s', \is_object($route[0]) ? get_debug_type($route[0]) : $route[0], $route[1]);
70+
$route = \sprintf('%s::%s', \is_object($route[0]) ? get_debug_type($route[0]) : $route[0], $route[1]);
7171
}
7272
}
7373

src/EventListener/TracingRequestListener.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ public function handleKernelRequestEvent(RequestEvent $event): void
4646

4747
$routeName = $request->attributes->get('_route');
4848
if (null !== $routeName && \is_string($routeName)) {
49-
$context->setName(sprintf('%s %s', $request->getMethod(), $routeName));
49+
$context->setName(\sprintf('%s %s', $request->getMethod(), $routeName));
5050
$context->setSource(TransactionSource::route());
5151
} else {
52-
$context->setName(sprintf('%s %s%s%s', $request->getMethod(), $request->getSchemeAndHttpHost(), $request->getBaseUrl(), $request->getPathInfo()));
52+
$context->setName(\sprintf('%s %s%s%s', $request->getMethod(), $request->getSchemeAndHttpHost(), $request->getBaseUrl(), $request->getPathInfo()));
5353
$context->setSource(TransactionSource::url());
5454
}
5555

src/EventListener/TracingSubRequestListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function handleKernelRequestEvent(RequestEvent $event): void
3636

3737
$spanContext = new SpanContext();
3838
$spanContext->setOp('http.server');
39-
$spanContext->setDescription(sprintf('%s %s%s%s', $request->getMethod(), $request->getSchemeAndHttpHost(), $request->getBaseUrl(), $request->getPathInfo()));
39+
$spanContext->setDescription(\sprintf('%s %s%s%s', $request->getMethod(), $request->getSchemeAndHttpHost(), $request->getBaseUrl(), $request->getPathInfo()));
4040
$spanContext->setData([
4141
'http.request.method' => $request->getMethod(),
4242
'http.url' => $request->getUri(),

src/Tracing/Cache/TraceableCacheAdapterForV2.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function get(string $key, callable $callback, float $beta = null, array &
4444
{
4545
return $this->traceFunction('cache.get_item', function () use ($key, $callback, $beta, &$metadata) {
4646
if (!$this->decoratedAdapter instanceof CacheInterface) {
47-
throw new \BadMethodCallException(sprintf('The %s::get() method is not supported because the decorated adapter does not implement the "%s" interface.', self::class, CacheInterface::class));
47+
throw new \BadMethodCallException(\sprintf('The %s::get() method is not supported because the decorated adapter does not implement the "%s" interface.', self::class, CacheInterface::class));
4848
}
4949

5050
return $this->decoratedAdapter->get($key, $callback, $beta, $metadata);

src/Tracing/Cache/TraceableCacheAdapterForV3.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function get(string $key, callable $callback, float $beta = null, array &
4242
{
4343
return $this->traceFunction('cache.get_item', function () use ($key, $callback, $beta, &$metadata) {
4444
if (!$this->decoratedAdapter instanceof CacheInterface) {
45-
throw new \BadMethodCallException(sprintf('The %s::get() method is not supported because the decorated adapter does not implement the "%s" interface.', self::class, CacheInterface::class));
45+
throw new \BadMethodCallException(\sprintf('The %s::get() method is not supported because the decorated adapter does not implement the "%s" interface.', self::class, CacheInterface::class));
4646
}
4747

4848
return $this->decoratedAdapter->get($key, $callback, $beta, $metadata);

src/Tracing/Cache/TraceableCacheAdapterTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function delete(string $key): bool
7070
{
7171
return $this->traceFunction('cache.delete_item', function () use ($key): bool {
7272
if (!$this->decoratedAdapter instanceof CacheInterface) {
73-
throw new \BadMethodCallException(sprintf('The %s::delete() method is not supported because the decorated adapter does not implement the "%s" interface.', self::class, CacheInterface::class));
73+
throw new \BadMethodCallException(\sprintf('The %s::delete() method is not supported because the decorated adapter does not implement the "%s" interface.', self::class, CacheInterface::class));
7474
}
7575

7676
return $this->decoratedAdapter->delete($key);

src/Tracing/Cache/TraceableTagAwareCacheAdapterForV2.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function get(string $key, callable $callback, float $beta = null, array &
4545
{
4646
return $this->traceFunction('cache.get_item', function () use ($key, $callback, $beta, &$metadata) {
4747
if (!$this->decoratedAdapter instanceof CacheInterface) {
48-
throw new \BadMethodCallException(sprintf('The %s::get() method is not supported because the decorated adapter does not implement the "%s" interface.', self::class, CacheInterface::class));
48+
throw new \BadMethodCallException(\sprintf('The %s::get() method is not supported because the decorated adapter does not implement the "%s" interface.', self::class, CacheInterface::class));
4949
}
5050

5151
return $this->decoratedAdapter->get($key, $callback, $beta, $metadata);

0 commit comments

Comments
 (0)