Code Duplication    Length = 19-21 lines in 2 locations

src/V2/OmsApi.php 2 locations

@@ 113-133 (lines=21) @@
110
        return $this->serializer->deserialize(GetICBufferStatusResponse::class, $result);
111
    }
112
113
    public function getICsFromOrder(
114
        Extension $extension,
115
        string $token,
116
        string $omsId,
117
        string $orderId,
118
        string $gtin,
119
        int $quantity,
120
        string $lastBlockId = '0'
121
    ): GetICsFromOrderResponse {
122
        $url = sprintf('/api/v2/%s/codes', (string)$extension);
123
        $result = $this->request($token, 'GET', $url, [
124
            'omsId' => $omsId,
125
            'orderId' => $orderId,
126
            'gtin' => $gtin,
127
            'quantity' => $quantity,
128
            'lastBlockId' => $lastBlockId,
129
        ]);
130
131
        /* @noinspection PhpIncompatibleReturnTypeInspection */
132
        return $this->serializer->deserialize(GetICsFromOrderResponse::class, $result);
133
    }
134
135
    public function closeICArray(
136
        Extension $extension,
@@ 135-153 (lines=19) @@
132
        return $this->serializer->deserialize(GetICsFromOrderResponse::class, $result);
133
    }
134
135
    public function closeICArray(
136
        Extension $extension,
137
        string $token,
138
        string $omsId,
139
        string $orderId,
140
        string $gtin,
141
        string $lastBlockId
142
    ): CloseICArrayResponse {
143
        $url = sprintf('/api/v2/%s/buffer/close', (string)$extension);
144
        $result = $this->request($token, 'POST', $url, [
145
            'omsId' => $omsId,
146
            'orderId' => $orderId,
147
            'gtin' => $gtin,
148
            'lastBlockId' => $lastBlockId,
149
        ]);
150
151
        /* @noinspection PhpIncompatibleReturnTypeInspection */
152
        return $this->serializer->deserialize(CloseICArrayResponse::class, $result);
153
    }
154
}
155