Code Duplication    Length = 16-16 lines in 2 locations

src/E2CardAPI.php 1 location

@@ 140-155 (lines=16) @@
137
     * @return ResponseInterface
138
     * @throws Exception\HttpException
139
     */
140
    private function send(RequestInterface $request): ResponseInterface
141
    {
142
        $started = microtime(true);
143
144
        try {
145
            $this->fire(StartedEvent::class, [$request, $started]);
146
            $response = $this->sender->send($request);
147
            $this->fire(SuccessEvent::class, [$request, $response, microtime(true), $started]);
148
149
            return $response;
150
        } catch (HttpException $e) {
151
            $this->fire(FailureEvent::class, [$request, microtime(true), $started]);
152
153
            throw $e;
154
        }
155
    }
156
157
    /**
158
     * Get message digest by GOST Р 34.11-94.

src/MerchantAPI.php 1 location

@@ 194-209 (lines=16) @@
191
     * @return ResponseInterface
192
     * @throws Exception\HttpException
193
     */
194
    private function send(RequestInterface $request): ResponseInterface
195
    {
196
        $started = microtime(true);
197
198
        try {
199
            $this->fire(StartedEvent::class, [$request, $started]);
200
            $response = $this->sender->send($request);
201
            $this->fire(SuccessEvent::class, [$request, $response, microtime(true), $started]);
202
203
            return $response;
204
        } catch (HttpException $e) {
205
            $this->fire(FailureEvent::class, [$request, microtime(true), $started]);
206
207
            throw $e;
208
        }
209
    }
210
211
    /**
212
     * Get signature for arguments.