Code Duplication    Length = 7-7 lines in 2 locations

src/Contracts/Options.php 2 locations

@@ 442-448 (lines=7) @@
439
            return $this;
440
        }
441
442
        if ($this->bodyFormat == 'json' && ! empty($payload)) {
443
            $this->option('json', $payload);
444
            $this->throwExceptionWhenPayloadIsNotArray($payload);
445
            $this->removeOptions(['body', 'payload']);
446
447
            return $this;
448
        }
449
450
        if ($this->bodyFormat == 'multipart' && !empty($payload)) {
451
@@ 463-469 (lines=7) @@
460
            return $this;
461
        }
462
463
        if ($this->bodyFormat == 'form_params' && !empty($payload)) {
464
            $this->option('body', $payload);
465
            $this->throwExceptionWhenPayloadIsNotArray($payload);
466
            $this->removeOptions(['json', 'payload']);
467
468
            return $this;
469
        }
470
471
        if ((is_string($payload) && $payload !== '')
472
            || is_resource($payload)