Skip to content

Commit 0d3ab6a

Browse files
committed
docs(types): Update PHPDoc comments for type hints in Client class
- Updated type hints in PHPDoc comments for messages and responses in the Client class to use more specific types - Changed `iterable<Message>` to `iterable<array-key, Message>` - Changed `list<Response|ResponseInterface>` to `array<array-key, Response|ResponseInterface>`
1 parent c6e2930 commit 0d3ab6a

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ $response = $promise->wait();
131131
### Concurrent requests
132132

133133
```php
134-
/** @var list<\Guanguans\Notify\Foundation\Contracts\Message> $messages */
135-
/** @var list<\Guanguans\Notify\Foundation\Response|\Psr\Http\Message\ResponseInterface> $responses */
134+
/** @var iterable<array-key, \Guanguans\Notify\Foundation\Contracts\Message> $messages */
135+
/** @var array<array-key, \Guanguans\Notify\Foundation\Response|\Psr\Http\Message\ResponseInterface> $responses */
136136
$responses = $client->pool($messages);
137137
```
138138

src/Foundation/Client.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@ public function sendAsync(Message $message): PromiseInterface
7575
}
7676

7777
/**
78-
* @param iterable<Message> $messages
78+
* @param iterable<array-key, Message> $messages
7979
*
8080
* @throws \GuzzleHttp\Exception\GuzzleException
8181
* @throws \Throwable
8282
*
83-
* @return list<Response|ResponseInterface>
83+
* @return array<array-key, Response|ResponseInterface>
8484
*/
8585
public function pool(iterable $messages): array
8686
{

0 commit comments

Comments
 (0)