Skip to content

Commit d0f0db6

Browse files
mdeboerwouterj
authored andcommitted
Improve some PHPdocs based on existing Symfony stubs in PHPstan and Psalm
1 parent f08fdc0 commit d0f0db6

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

Extension/ExtensionInterface.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ interface ExtensionInterface
2323
/**
2424
* Loads a specific configuration.
2525
*
26+
* @param array<array<mixed>> $configs
27+
*
2628
* @throws \InvalidArgumentException When provided tag is not defined in this extension
2729
*/
2830
public function load(array $configs, ContainerBuilder $container);

ParameterBag/ContainerBagInterface.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ public function all(): array;
2929
/**
3030
* Replaces parameter placeholders (%name%) by their values.
3131
*
32+
* @template TValue of array<array|scalar>|scalar
33+
*
34+
* @param TValue $value
35+
*
36+
* @psalm-return (TValue is scalar ? array|scalar : array<array|scalar>)
37+
*
3238
* @throws ParameterNotFoundException if a placeholder references a parameter that does not exist
3339
*/
3440
public function resolveValue(mixed $value);

ParameterBag/ParameterBag.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,12 @@ public function resolve()
148148
/**
149149
* Replaces parameter placeholders (%name%) by their values.
150150
*
151-
* @param array $resolving An array of keys that are being resolved (used internally to detect circular references)
151+
* @template TValue of array<array|scalar>|scalar
152+
*
153+
* @param TValue $value
154+
* @param array $resolving An array of keys that are being resolved (used internally to detect circular references)
155+
*
156+
* @return (TValue is scalar ? array|scalar : array<array|scalar>)
152157
*
153158
* @throws ParameterNotFoundException if a placeholder references a parameter that does not exist
154159
* @throws ParameterCircularReferenceException if a circular reference if detected

0 commit comments

Comments
 (0)