Code Duplication    Length = 12-12 lines in 2 locations

src/JsonDecoder.php 2 locations

@@ 268-279 (lines=12) @@
265
     *
266
     * @throws \InvalidArgumentException If the passed decoding is invalid
267
     */
268
    public function setObjectDecoding($decoding)
269
    {
270
        if (self::OBJECT !== $decoding && self::ASSOC_ARRAY !== $decoding) {
271
            throw new \InvalidArgumentException(sprintf(
272
                'Expected JsonDecoder::JSON_OBJECT or JsonDecoder::ASSOC_ARRAY. '.
273
                'Got: %s',
274
                $decoding
275
            ));
276
        }
277
278
        $this->objectDecoding = $decoding;
279
    }
280
281
    /**
282
     * Returns the decoding of big integers.
@@ 300-311 (lines=12) @@
297
     *
298
     * @throws \InvalidArgumentException If the passed decoding is invalid
299
     */
300
    public function setBigIntDecoding($decoding)
301
    {
302
        if (self::FLOAT !== $decoding && self::STRING !== $decoding) {
303
            throw new \InvalidArgumentException(sprintf(
304
                'Expected JsonDecoder::FLOAT or JsonDecoder::JSON_STRING. '.
305
                'Got: %s',
306
                $decoding
307
            ));
308
        }
309
310
        $this->bigIntDecoding = $decoding;
311
    }
312
313
    private function decodeJson($json)
314
    {