Code Duplication    Length = 9-9 lines in 2 locations

src/CouchDB/Exception/JsonDecodeException.php 1 location

@@ 8-16 (lines=9) @@
5
/**
6
 * @author Markus Bachmann <[email protected]>
7
 */
8
class JsonDecodeException extends JsonException
9
{
10
    public function __construct($json, $code = 0, $previous = null)
11
    {
12
        $message = sprintf('Json decode error [%s]: %s', self::$errors[json_last_error()], $json);
13
14
        parent::__construct($message, $code, $previous);
15
    }
16
}
17

src/CouchDB/Exception/JsonEncodeException.php 1 location

@@ 8-16 (lines=9) @@
5
/**
6
 * @author Markus Bachmann <[email protected]>
7
 */
8
class JsonEncodeException extends JsonException
9
{
10
    public function __construct($data, $code = 0, $previous = null)
11
    {
12
        $message = sprintf('Json encode error [%s]: %s', self::$errors[json_last_error()], var_export($data, true));
13
14
        parent::__construct($message, $code, $previous);
15
    }
16
}
17