Skip to content

Commit b1b8b17

Browse files
authored
style: Update CS (#678)
1 parent ea1a1f5 commit b1b8b17

File tree

4 files changed

+15
-18
lines changed

4 files changed

+15
-18
lines changed

phpstan-baseline.neon

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,11 @@ parameters:
230230
count: 1
231231
path: src/Tracing/Doctrine/DBAL/TracingStatementForV3.php
232232

233+
-
234+
message: "#^Parameter \\#4 \\$length of method Doctrine\\\\DBAL\\\\Driver\\\\Statement\\:\\:bindParam\\(\\) expects int\\|null, mixed given\\.$#"
235+
count: 1
236+
path: src/Tracing/Doctrine/DBAL/TracingStatementForV3.php
237+
233238
-
234239
message: "#^Method Sentry\\\\SentryBundle\\\\Tracing\\\\HttpClient\\\\AbstractTraceableHttpClient\\:\\:request\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#"
235240
count: 1
@@ -245,11 +250,6 @@ parameters:
245250
count: 1
246251
path: src/Tracing/HttpClient/TraceableHttpClientForV6.php
247252

248-
-
249-
message: "#^Call to an undefined method Symfony\\\\Contracts\\\\HttpClient\\\\ResponseInterface\\:\\:toStream\\(\\)\\.$#"
250-
count: 1
251-
path: src/Tracing/HttpClient/TraceableResponseForV5.php
252-
253253
-
254254
message: "#^Call to an undefined method Symfony\\\\Contracts\\\\HttpClient\\\\ResponseInterface\\:\\:toStream\\(\\)\\.$#"
255255
count: 1

src/DependencyInjection/SentryExtension.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
namespace Sentry\SentryBundle\DependencyInjection;
66

77
use Doctrine\Bundle\DoctrineBundle\DoctrineBundle;
8-
use LogicException;
98
use Psr\Log\NullLogger;
109
use Sentry\Client;
1110
use Sentry\ClientBuilder;
@@ -204,7 +203,7 @@ private function registerDbalTracingConfiguration(ContainerBuilder $container, a
204203
&& $this->isConfigEnabled($container, $config['dbal']);
205204

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

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

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

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

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

248247
$container->setParameter('sentry.tracing.cache.enabled', $isConfigEnabled);
@@ -257,7 +256,7 @@ private function registerHttpClientTracingConfiguration(ContainerBuilder $contai
257256
&& $this->isConfigEnabled($container, $config['http_client']);
258257

259258
if ($isConfigEnabled && !class_exists(HttpClient::class)) {
260-
throw new LogicException('Http client tracing support cannot be enabled because the symfony/http-client Composer package is not installed.');
259+
throw new \LogicException('Http client tracing support cannot be enabled because the symfony/http-client Composer package is not installed.');
261260
}
262261

263262
$container->setParameter('sentry.tracing.http_client.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)