8000 [Messenger] Backport type fixes · symfony/symfony@65ec8f9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 65ec8f9

Browse files
committed
[Messenger] Backport type fixes
Signed-off-by: Alexander M. Turek <me@derrabus.de>
1 parent 2468019 commit 65ec8f9

File tree

7 files changed

+12
-8
lines changed

7 files changed

+12
-8
lines changed

src/Symfony/Component/Messenger/Bridge/AmazonSqs/Transport/AmazonSqsFifoStamp.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
final class AmazonSqsFifoStamp implements NonSendableStampInterface
1717
{
1818
private $messageGroupId;
19-
2019
private $messageDeduplicationId;
2120

2221
public function __construct(string $messageGroupId = null, string $messageDeduplicationId = null)

src/Symfony/Component/Messenger/Bridge/AmazonSqs/Transport/Connection.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ public function get(): ?array
186186
}
187187

188188
/**
189-
* @return array[]
189+
* @return \Generator<int, array>
190190
*/
191191
private function getNextMessages(): \Generator
192192
{
@@ -195,7 +195,7 @@ private function getNextMessages(): \Generator
195195
}
196196

197197
/**
198-
* @return array[]
198+
* @return \Generator<int, array>
199199
*/
200200
private function getPendingMessages(): \Generator
201201
{
@@ -205,7 +205,7 @@ private function getPendingMessages(): \Generator
205205
}
206206

207207
/**
208-
* @return array[]
208+
* @return \Generator<int, array>
209209
*/
210210
private function getNewMessages(): \Generator
211211
{

src/Symfony/Component/Messenger/Envelope.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
*/
2121
final class Envelope
2222
{
23+
/**
24+
* @var array<string, list<StampInterface>>
25+
*/
2326
private $stamps = [];
2427
private $message;
2528

src/Symfony/Component/Messenger/MessageBus.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class MessageBus implements MessageBusInterface
2424
private $middlewareAggregate;
2525

2626
/**
27-
* @param MiddlewareInterface[]|iterable $middlewareHandlers
27+
* @param iterable<mixed, MiddlewareInterface> $middlewareHandlers
2828
*/
2929
public function __construct(iterable $middlewareHandlers = [])
3030
{

src/Symfony/Component/Messenger/Middleware/StackMiddleware.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class StackMiddleware implements MiddlewareInterface, StackInterface
2222
private $offset = 0;
2323

2424
/**
25-
* @param iterable|MiddlewareInterface[]|MiddlewareInterface|null $middlewareIterator
25+
* @param iterable<mixed, MiddlewareInterface>|MiddlewareInterface|null $middlewareIterator
2626
*/
2727
public function __construct($middlewareIterator = null)
2828
{

src/Symfony/Component/Messenger/Tests/HandleTraitTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ class TestQueryBus
8282

8383
public function __construct(?MessageBusInterface $messageBus)
8484
{
85-
$this->messageBus = $messageBus;
85+
if ($messageBus) {
86+
$this->messageBus = $messageBus;
87+
}
8688
}
8789

8890
public function query($query): string

src/Symfony/Component/Messenger/Transport/TransportFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class TransportFactory implements TransportFactoryInterface
2222
private $factories;
2323

2424
/**
25-
* @param iterable|TransportFactoryInterface[] $factories
25+
* @param iterable<mixed, TransportFactoryInterface> $factories
2626
*/
2727
public function __construct(iterable $factories)
2828
{

0 commit comments

Comments
 (0)
0