Code Duplication    Length = 9-10 lines in 2 locations

src/EventDispatcherHttpAdapter.php 2 locations

@@ 101-110 (lines=10) @@
98
        $responses = [];
99
        $exceptions = [];
100
101
        if (!empty($internalRequests)) {
102
            $this->eventDispatcher->dispatch(
103
                Events::MULTI_REQUEST_CREATED,
104
                $multiRequestCreatedEvent = new MultiRequestCreatedEvent($this, $internalRequests)
105
            );
106
107
            $internalRequests = $multiRequestCreatedEvent->getRequests();
108
            $responses = $multiRequestCreatedEvent->getResponses();
109
            $exceptions = $multiRequestCreatedEvent->getExceptions();
110
        }
111
112
        try {
113
            $responses = array_merge($responses, parent::doSendInternalRequests($internalRequests));
@@ 119-127 (lines=9) @@
116
            $exceptions = array_merge($exceptions, $e->getExceptions());
117
        }
118
119
        if (!empty($responses)) {
120
            $this->eventDispatcher->dispatch(
121
                Events::MULTI_REQUEST_SENT,
122
                $requestSentEvent = new MultiRequestSentEvent($this, $responses)
123
            );
124
125
            $exceptions = array_merge($exceptions, $requestSentEvent->getExceptions());
126
            $responses = $requestSentEvent->getResponses();
127
        }
128
129
        if (!empty($exceptions)) {
130
            $this->eventDispatcher->dispatch(