Code Duplication    Length = 5-5 lines in 2 locations

projects/plugins/jetpack/extensions/blocks/premium-content/_inc/subscription-service/class-jwt.php 2 locations

@@ 320-324 (lines=5) @@
317
318
		$errno = json_last_error();
319
320
		if ( $errno && function_exists( 'json_last_error' ) ) {
321
			static::handle_json_error( $errno );
322
		} elseif ( null === $obj && 'null' !== $input ) {
323
			throw new DomainException( 'Null result with non-null input' );
324
		}
325
		return $obj;
326
	}
327
@@ 341-345 (lines=5) @@
338
		$json  = wp_json_encode( $input );
339
		$errno = json_last_error();
340
341
		if ( $errno && function_exists( 'json_last_error' ) ) {
342
			static::handle_json_error( $errno );
343
		} elseif ( 'null' === $json && null !== $input ) {
344
			throw new DomainException( 'Null result with non-null input' );
345
		}
346
		return $json;
347
	}
348