Code Duplication    Length = 3-3 lines in 2 locations

Client/Client.php 2 locations

@@ 62-64 (lines=3) @@
59
     */
60
    public function validateResponse($decoded)
61
    {
62
        if (!isset($decoded['success'], $decoded['data']) || !is_array($decoded['data'])) {
63
            throw new MalformedDataException();
64
        }
65
66
        if (!$decoded['success']) {
67
            $message = isset($decoded['data']['message']) ? $decoded['data']['message'] : null;
@@ 72-74 (lines=3) @@
69
            throw new ServerErrorException($message, $code);
70
        }
71
72
        if (!isset($decoded['data']['locations']) || !is_array($decoded['data']['locations'])) {
73
            throw new MalformedDataException();
74
        }
75
    }
76
77
    /**