Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit bbdc403

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

File tree

1 file changed

+7
-0
lines changed
Filter options

1 file changed

+7
-0
lines changed

‎src/Symfony/Component/Messenger/Envelope.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Messenger/Envelope.php
+7Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.