8000 [Messenger] Added generic template for `Envelope::last()` method · fancyweb/symfony@bbdc403 · GitHub
[go: up one dir, main page]

Skip to content

Commit bbdc403

Browse files
committed
[Messenger] Added generic template for Envelope::last() method
1 parent 626d9aa commit bbdc403

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Symfony/Component/Messenger/Envelope.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,13 @@ public function withoutStampsOfType(string $type): self
9494
return $cloned;
9595
}
9696

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

0 commit comments

Comments
 (0)
0