Skip to content

Commit bc2c172

Browse files
committed
PHPStan + CS
1 parent 7f3dc17 commit bc2c172

File tree

4 files changed

+14
-23
lines changed

4 files changed

+14
-23
lines changed

phpstan-baseline.neon

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,11 @@ parameters:
9090
count: 1
9191
path: src/DependencyInjection/SentryExtension.php
9292

93+
-
94+
message: "#^Cannot access offset 'before_send_metric' on mixed\\.$#"
95+
count: 1
96+
path: src/DependencyInjection/SentryExtension.php
97+
9398
-
9499
message: "#^Parameter \\#1 \\$array of function array_filter expects array, mixed given\\.$#"
95100
count: 1
@@ -102,7 +107,7 @@ parameters:
102107

103108
-
104109
message: "#^Parameter \\#1 \\$id of class Symfony\\\\Component\\\\DependencyInjection\\\\Reference constructor expects string, mixed given\\.$#"
105-
count: 11
110+
count: 12
106111
path: src/DependencyInjection/SentryExtension.php
107112

108113
-
@@ -170,21 +175,6 @@ parameters:
170175
count: 1
171176
path: src/EventListener/LoginListener.php
172177

173-
-
174-
message: "#^Instanceof between Throwable and Symfony\\\\Component\\\\Messenger\\\\Exception\\\\DelayedMessageHandlingException will always evaluate to false\\.$#"
175-
count: 1
176-
path: src/EventListener/MessengerListener.php
177-
178-
-
179-
message: "#^Instanceof between Throwable and Symfony\\\\Component\\\\Messenger\\\\Exception\\\\HandlerFailedException will always evaluate to false\\.$#"
180-
count: 1
181-
path: src/EventListener/MessengerListener.php
182-
183-
-
184-
message: "#^Result of && is always false\\.$#"
185-
count: 2
186-
path: src/EventListener/MessengerListener.php
187-
188178
-
189179
message: "#^Call to an undefined method Symfony\\\\Component\\\\HttpKernel\\\\Event\\\\KernelEvent\\:\\:isMasterRequest\\(\\)\\.$#"
190180
count: 1

src/DependencyInjection/SentryExtension.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ private function registerHttpClientTracingConfiguration(ContainerBuilder $contai
320320
}
321321

322322
/**
323-
* @param string[] $integrations
323+
* @param string[] $integrations
324324
* @param array<string, mixed> $config
325325
*
326326
* @return array<Reference|Definition>
@@ -352,12 +352,12 @@ private function configureRequestIntegration(array $integrations, bool $useDefau
352352

353353
/**
354354
* @param class-string<IntegrationInterface> $integrationClass
355-
* @param array<Reference|Definition> $integrations
355+
* @param array<Reference|Definition> $integrations
356356
*/
357357
private function isIntegrationEnabled(string $integrationClass, array $integrations): bool
358358
{
359359
foreach ($integrations as $integration) {
360-
if ($integration instanceof Reference && $integrationClass === (string)$integration) {
360+
if ($integration instanceof Reference && $integrationClass === (string) $integration) {
361361
return true;
362362
}
363363

tests/DependencyInjection/SentryExtensionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ private function createContainerFromFixture(string $fixtureFile): ContainerBuild
499499

500500
/**
501501
* @param array<int, mixed> $methodCall
502-
* @param mixed[] $arguments
502+
* @param mixed[] $arguments
503503
*/
504504
private function assertDefinitionMethodCallAt(array $methodCall, string $method, array $arguments): void
505505
{
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Sentry\SentryBundle\Tests\End2End\Fixtures;
46

57
use Sentry\Metrics\Types\Metric;
68

79
class SentryCallbacks
810
{
9-
1011
public static function getBeforeSendMetric(): callable
1112
{
1213
return static function (Metric $metric): ?Metric {
13-
if ($metric->getName() === 'test-counter') {
14+
if ('test-counter' === $metric->getName()) {
1415
return null;
1516
}
17+
1618
return $metric;
1719
};
1820
}
19-
2021
}

0 commit comments

Comments
 (0)