Skip to content

Commit a458d86

Browse files
committed
ref: Apply PHP-CS-Fixer
1 parent 26a4b44 commit a458d86

File tree

3 files changed

+9
-12
lines changed

3 files changed

+9
-12
lines changed

src/DependencyInjection/SentryExtension.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
use Doctrine\Bundle\DoctrineBundle\DoctrineBundle;
88
use Jean85\PrettyVersions;
9-
use LogicException;
109
use Psr\Log\NullLogger;
1110
use Sentry\Client;
1211
use Sentry\ClientBuilder;
@@ -203,7 +202,7 @@ private function registerDbalTracingConfiguration(ContainerBuilder $container, a
203202
&& $this->isConfigEnabled($container, $config['dbal']);
204203

205204
if ($isConfigEnabled && !class_exists(DoctrineBundle::class)) {
206-
throw new LogicException('DBAL tracing support cannot be enabled because the doctrine/doctrine-bundle Composer package is not installed.');
205+
throw new \LogicException('DBAL tracing support cannot be enabled because the doctrine/doctrine-bundle Composer package is not installed.');
207206
}
208207

209208
$container->setParameter('sentry.tracing.dbal.enabled', $isConfigEnabled);
@@ -224,7 +223,7 @@ private function registerTwigTracingConfiguration(ContainerBuilder $container, a
224223
&& $this->isConfigEnabled($container, $config['twig']);
225224

226225
if ($isConfigEnabled && !class_exists(TwigBundle::class)) {
227-
throw new LogicException('Twig tracing support cannot be enabled because the symfony/twig-bundle Composer package is not installed.');
226+
throw new \LogicException('Twig tracing support cannot be enabled because the symfony/twig-bundle Composer package is not installed.');
228227
}
229228

230229
if (!$isConfigEnabled) {
@@ -241,7 +240,7 @@ private function registerCacheTracingConfiguration(ContainerBuilder $container,
241240
&& $this->isConfigEnabled($container, $config['cache']);
242241

243242
if ($isConfigEnabled && !class_exists(CacheItem::class)) {
244-
throw new LogicException('Cache tracing support cannot be enabled because the symfony/cache Composer package is not installed.');
243+
throw new \LogicException('Cache tracing support cannot be enabled because the symfony/cache Composer package is not installed.');
245244
}
246245

247246
$container->setParameter('sentry.tracing.cache.enabled', $isConfigEnabled);

src/Tracing/Twig/TwigTracingExtension.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
use Sentry\State\HubInterface;
88
use Sentry\Tracing\Span;
99
use Sentry\Tracing\SpanContext;
10-
use SplObjectStorage;
1110
use Twig\Extension\AbstractExtension;
1211
use Twig\Profiler\NodeVisitor\ProfilerNodeVisitor;
1312
use Twig\Profiler\Profile;
@@ -20,7 +19,7 @@ final class TwigTracingExtension extends AbstractExtension
2019
private $hub;
2120

2221
/**
23-
* @var SplObjectStorage<object, Span> The currently active spans
22+
* @var \SplObjectStorage<object, Span> The currently active spans
2423
*/
2524
private $spans;
2625

@@ -30,7 +29,7 @@ final class TwigTracingExtension extends AbstractExtension
3029
public function __construct(HubInterface $hub)
3130
{
3231
$this->hub = $hub;
33-
$this->spans = new SplObjectStorage();
32+
$this->spans = new \SplObjectStorage();
3433
}
3534

3635
/**

tests/EventListener/TracingConsoleListenerTest.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
namespace Sentry\SentryBundle\Tests\EventListener;
66

7-
use Generator;
87
use PHPUnit\Framework\MockObject\MockObject;
98
use PHPUnit\Framework\TestCase;
109
use Sentry\SentryBundle\EventListener\TracingConsoleListener;
@@ -65,9 +64,9 @@ public function testHandleConsoleCommandEventStartsTransactionIfNoSpanIsSetOnHub
6564
}
6665

6766
/**
68-
* @return Generator<mixed>
67+
* @return \Generator<mixed>
6968
*/
70-
public function handleConsoleCommandEventStartsTransactionIfNoSpanIsSetOnHubDataProvider(): Generator
69+
public function handleConsoleCommandEventStartsTransactionIfNoSpanIsSetOnHubDataProvider(): \Generator
7170
{
7271
$transactionContext = new TransactionContext();
7372
$transactionContext->setOp('console.command');
@@ -121,9 +120,9 @@ public function testHandleConsoleCommandEventStartsChildSpanIfSpanIsSetOnHub(Com
121120
}
122121

123122
/**
124-
* @return Generator<mixed>
123+
* @return \Generator<mixed>
125124
*/
126-
public function handleConsoleCommandEventStartsChildSpanIfSpanIsSetOnHubDataProvider(): Generator
125+
public function handleConsoleCommandEventStartsChildSpanIfSpanIsSetOnHubDataProvider(): \Generator
127126
{
128127
yield [
129128
new Command(),

0 commit comments

Comments
 (0)