Skip to content

Commit 2451597

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

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Envelope.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
final class Envelope
2222
{
2323
/**
24-
* @var array<string, list<StampInterface>>
24+
* @var array<class-string<StampInterface>, list<StampInterface>>
2525
*/
2626
private array $stamps = [];
2727
private object $message;
@@ -106,7 +106,13 @@ public function last(string $stampFqcn): ?StampInterface
106106
}
107107

108108
/**
109+
* @template TStamp of StampInterface
110+
*
111+
* @param class-string<TStamp>|null $stampFqcn
112+
*
109113
* @return StampInterface[]|StampInterface[][] The stamps for the specified FQCN, or all stamps by their class name
114+
*
115+
* @psalm-return ($stampFqcn is string : array<class-string<StampInterface>, list<StampInterface>> ? list<TStamp>)
110116
*/
111117
public function all(string $stampFqcn = null): array
112118
{

0 commit comments

Comments
 (0)