Skip to content

Commit b2f145b

Browse files
author
Сергей Кривич
committed
Add calling setEventDispatcher method in CLientFactory
1 parent 27e9e8e commit b2f145b

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

src/Factory/ClientFactory.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ public function createClient(string $apiUrl, string $apiKey): Client
285285
->setStreamFactory($this->streamFactory)
286286
->setRequestFactory($this->requestFactory)
287287
->setUriFactory($this->uriFactory)
288+
->setEventDispatcher($this->eventDispatcher)
288289
->appendRequestHandlers($this->requestHandlers)
289290
->appendResponseHandlers($this->responseHandlers)
290291
->build();

src/Traits/EventDispatcherAwareTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ trait EventDispatcherAwareTrait
2727
*
2828
* @param \Psr\EventDispatcher\EventDispatcherInterface|null $eventDispatcher
2929
*
30-
* @return object
30+
* @return static
3131
*/
3232
public function setEventDispatcher(?EventDispatcherInterface $eventDispatcher): object
3333
{

0 commit comments

Comments
 (0)