8000 minor #44583 [Messenger] Added generic template for `Envelope::last()… · symfony/symfony@a976d27 · GitHub
[go: up one dir, main page]

Skip to content

Commit a976d27

Browse files

Original file line numberDiff line numberDiff line change
@@ -93,6 +93,13 @@ public function withoutStampsOfType(string $type): self
9393
return $cloned;
9494
}
9595

96+
/**
97+
* @template TStamp of StampInterface
98+
*
99+
* @param class-string<TStamp> $stampFqcn
100+
*
101+
* @return TStamp|null
102+
*/
96103
public function last(string $stampFqcn): ?StampInterface
97104
{
98105
return isset($this->stamps[$stampFqcn]) ? end($this->stamps[$stampFqcn]) : null;