Skip to content

Commit e5197cb

Browse files
committed
wip
1 parent 71c0d1d commit e5197cb

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

src/DependencyInjection/Configuration.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use Symfony\Bundle\TwigBundle\TwigBundle;
1010
use Symfony\Component\Cache\CacheItem;
1111
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
12+
use Symfony\Component\Config\Definition\Builder\NodeParentInterface;
1213
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
1314
use Symfony\Component\Config\Definition\ConfigurationInterface;
1415
use Symfony\Component\HttpClient\HttpClient;
@@ -19,12 +20,14 @@ final class Configuration implements ConfigurationInterface
1920
{
2021
/**
2122
* {@inheritdoc}
23+
*
24+
* @phpstan-return TreeBuilder<'array'>
2225
*/
2326
public function getConfigTreeBuilder(): TreeBuilder
2427
{
2528
$treeBuilder = new TreeBuilder('sentry');
2629

27-
/** @var ArrayNodeDefinition $rootNode */
30+
/** @phpstan-var ArrayNodeDefinition<NodeParentInterface|null> $rootNode */
2831
$rootNode = method_exists(TreeBuilder::class, 'getRootNode')
2932
? $treeBuilder->getRootNode()
3033
: $treeBuilder->root('sentry');
@@ -38,6 +41,7 @@ public function getConfigTreeBuilder(): TreeBuilder
3841
$inAppExcludes[] = '%kernel.build_dir%';
3942
}
4043

44+
// @phpstan-ignore-next-line
4145
$rootNode
4246
->children()
4347
->scalarNode('dsn')
@@ -176,8 +180,12 @@ public function getConfigTreeBuilder(): TreeBuilder
176180
return $treeBuilder;
177181
}
178182

183+
/**
184+
* @phpstan-param ArrayNodeDefinition<NodeParentInterface|null> $rootNode
185+
*/
179186
private function addMessengerSection(ArrayNodeDefinition $rootNode): void
180187
{
188+
// @phpstan-ignore-next-line
181189
$rootNode
182190
->children()
183191
->arrayNode('messenger')
@@ -190,8 +198,12 @@ private function addMessengerSection(ArrayNodeDefinition $rootNode): void
190198
->end();
191199
}
192200

201+
/**
202+
* @phpstan-param ArrayNodeDefinition<NodeParentInterface|null> $rootNode
203+
*/
193204
private function addDistributedTracingSection(ArrayNodeDefinition $rootNode): void
194205
{
206+
// @phpstan-ignore-next-line
195207
$rootNode
196208
->children()
197209
->arrayNode('tracing')

src/Tracing/Cache/TraceableCacheAdapterTrait.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public function getItem($key): CacheItem
4646

4747
/**
4848
* {@inheritdoc}
49+
* @return iterable<string, CacheItemInterface>
4950
*/
5051
public function getItems(array $keys = []): iterable
5152
{
@@ -223,9 +224,9 @@ private function traceFunction(string $spanOperation, \Closure $callback, ?strin
223224
*
224225
* Use this method if you want to instrument {@see CacheInterface::get()}.
225226
*
226-
* @param string $key
227-
* @param callable $callback
228-
* @param float|null $beta
227+
* @param string $key
228+
* @param callable $callback
229+
* @param float|null $beta
229230
* @param array<int|string,mixed>|null $metadata
230231
*
231232
* @return mixed

0 commit comments

Comments
 (0)