Code Duplication    Length = 12-13 lines in 2 locations

src/Services/Client.php 2 locations

@@ 40-52 (lines=13) @@
37
     *
38
     * @throws \Inspirum\Balikobot\Contracts\ExceptionInterface
39
     */
40
    public function addPackages(string $shipper, array $packages): array
41
    {
42
        $response = $this->requester->call('v1', $shipper, Request::ADD, $packages);
43
44
        if (isset($response[0]['package_id']) === false) {
45
            throw new BadRequestException($response);
46
        }
47
48
        unset($response['labels_url']);
49
        unset($response['status']);
50
51
        return $response;
52
    }
53
54
    /**
55
     * Drops a package from the Balikobot – the package must be not ordered
@@ 576-587 (lines=12) @@
573
     *
574
     * @throws \Inspirum\Balikobot\Contracts\ExceptionInterface
575
     */
576
    public function orderB2AShipment(string $shipper, array $packages): array
577
    {
578
        $response = $this->requester->call('v1', $shipper, Request::B2A, $packages);
579
580
        if (isset($response[0]['package_id']) === false) {
581
            throw new BadRequestException($response);
582
        }
583
584
        unset($response['status']);
585
586
        return $response;
587
    }
588
}
589