Code Duplication    Length = 19-21 lines in 2 locations

src/V2/OmsApi.php 2 locations

@@ 84-104 (lines=21) @@
81
        return $this->serializer->deserialize(GetICBufferStatusResponse::class, $result);
82
    }
83
84
    public function getICsFromOrder(
85
        Extension $extension,
86
        string $token,
87
        string $omsId,
88
        string $orderId,
89
        string $gtin,
90
        int $quantity,
91
        string $lastBlockId = '0'
92
    ): GetICsFromOrderResponse {
93
        $url = sprintf('/api/v2/%s/codes', (string)$extension);
94
        $result = $this->request($token, 'GET', $url, [
95
            'omsId' => $omsId,
96
            'orderId' => $orderId,
97
            'gtin' => $gtin,
98
            'quantity' => $quantity,
99
            'lastBlockId' => $lastBlockId,
100
        ]);
101
102
        /* @noinspection PhpIncompatibleReturnTypeInspection */
103
        return $this->serializer->deserialize(GetICsFromOrderResponse::class, $result);
104
    }
105
106
    public function closeICArray(
107
        Extension $extension,
@@ 106-124 (lines=19) @@
103
        return $this->serializer->deserialize(GetICsFromOrderResponse::class, $result);
104
    }
105
106
    public function closeICArray(
107
        Extension $extension,
108
        string $token,
109
        string $omsId,
110
        string $orderId,
111
        string $gtin,
112
        string $lastBlockId
113
    ): CloseICArrayResponse {
114
        $url = sprintf('/api/v2/%s/buffer/close', (string)$extension);
115
        $result = $this->request($token, 'POST', $url, [
116
            'omsId' => $omsId,
117
            'orderId' => $orderId,
118
            'gtin' => $gtin,
119
            'lastBlockId' => $lastBlockId,
120
        ]);
121
122
        /* @noinspection PhpIncompatibleReturnTypeInspection */
123
        return $this->serializer->deserialize(CloseICArrayResponse::class, $result);
124
    }
125
126
    /**
127
     * @throws OmsRequestErrorException