Code Duplication    Length = 10-10 lines in 2 locations

src/Client.php 2 locations

@@ 540-549 (lines=10) @@
537
     *
538
     * @return array
539
     */
540
    private function clientError(\GuzzleHttp\Exception\ClientException $exception)
541
    {
542
        $body = (string) $exception->getResponse()->getBody();
543
544
        return [
545
            'status'    => 'error',
546
            'http_code' => $exception->getResponse()->getStatusCode(),
547
            'body'      => json_decode($body),
548
        ];
549
    }
550
551
    /**
552
     * Parse the java exception that we receive from Smartcall's Tomcat's.
@@ 558-567 (lines=10) @@
555
     *
556
     * @return array
557
     */
558
    private function parseError(\GuzzleHttp\Exception\ServerException $exception)
559
    {
560
        $body = (string) $exception->getResponse()->getBody();
561
        preg_match('!<p><b>type</b> Exception report</p><p><b>message</b> <u>(.*[^</u>])</u></p><p><b>description</b>!', $body, $matches);
562
563
        return [
564
            'status'    => 'error',
565
            'http_code' => $exception->getResponse()->getStatusCode(),
566
            'body'      => $matches['1'],
567
        ];
568
    }
569
570
    /**