Code Duplication    Length = 9-10 lines in 10 locations

src/YahooShoppingJp/Request/UpdateOrderShippingStatusRequest.php 3 locations

@@ 186-195 (lines=10) @@
183
     * @param string $shipInvoiceNumber1
184
     * @return self
185
     */
186
    public function setShipInvoiceNumber1(string $shipInvoiceNumber1): self
187
    {
188
        if (isset($this->params['Order']['Ship']['ShipInvoiceNumber1'])) {
189
            throw new LogicException('ShipInvoiceNumber1 is already set.');
190
        }
191
192
        $this->params['Order']['Ship']['ShipInvoiceNumber1'] = $shipInvoiceNumber1;
193
194
        return $this;
195
    }
196
197
    /**
198
     * @param string $shipInvoiceNumber2
@@ 201-210 (lines=10) @@
198
     * @param string $shipInvoiceNumber2
199
     * @return self
200
     */
201
    public function setShipInvoiceNumber2(string $shipInvoiceNumber2): self
202
    {
203
        if (isset($this->params['Order']['Ship']['ShipInvoiceNumber2'])) {
204
            throw new LogicException('ShipInvoiceNumber2 is already set.');
205
        }
206
207
        $this->params['Order']['Ship']['ShipInvoiceNumber2'] = $shipInvoiceNumber2;
208
209
        return $this;
210
    }
211
212
    /**
213
     * @param string $shipUrl
@@ 216-225 (lines=10) @@
213
     * @param string $shipUrl
214
     * @return self
215
     */
216
    public function setShipUrl(string $shipUrl): self
217
    {
218
        if (isset($this->params['Order']['Ship']['ShipUrl'])) {
219
            throw new LogicException('ShipUrl is already set.');
220
        }
221
222
        $this->params['Order']['Ship']['ShipUrl'] = '![CDATA[' . $shipUrl . ']]';
223
224
        return $this;
225
    }
226
227
    /**
228
     * @param \DateTimeImmutable $shipDate

src/YahooShoppingJp/Request/UpdateOrderInfoRequest.php 7 locations

@@ 123-131 (lines=9) @@
120
     *
121
     * @return self
122
     */
123
    public function setIsSeen(bool $isSeen): self
124
    {
125
        if (isset($this->params['Order']['IsSeen'])) {
126
            throw new LogicException('IsSeen is already set.');
127
        }
128
        $this->params['Order']['IsSeen'] = $isSeen ? 'true' : 'false';
129
130
        return $this;
131
    }
132
133
    /**
134
     * 悪戯フラグ
@@ 204-212 (lines=9) @@
201
     * @param string $payMethodName
202
     * @return self
203
     */
204
    public function setPayMethodName(string $payMethodName): self
205
    {
206
        if (isset($this->params['Order']['PayMethodName'])) {
207
            throw new LogicException('PayMethodName is already set.');
208
        }
209
        $this->params['Order']['PayMethodName'] = $payMethodName;
210
211
        return $this;
212
    }
213
214
    /**
215
     * ストアステータス
@@ 222-230 (lines=9) @@
219
     * @param string $storeStatus
220
     * @return self
221
     */
222
    public function setStoreStatus(string $storeStatus): self
223
    {
224
        if (isset($this->params['Order']['StoreStatus'])) {
225
            throw new LogicException('StoreStatus is already set.');
226
        }
227
        $this->params['Order']['StoreStatus'] = $storeStatus;
228
229
        return $this;
230
    }
231
232
    /**
233
     * 注文伝票出力時刻
@@ 294-302 (lines=9) @@
291
     * @param string $buyerComments
292
     * @return self
293
     */
294
    public function setBuyerComments(string $buyerComments): self
295
    {
296
        if (isset($this->params['Order']['BuyerComments'])) {
297
            throw new LogicException('BuyerComments is already set.');
298
        }
299
        $this->params['Order']['BuyerComments'] = $buyerComments;
300
301
        return $this;
302
    }
303
304
    /**
305
     * セラーコメント
@@ 312-320 (lines=9) @@
309
     * @param string $sellerComments
310
     * @return self
311
     */
312
    public function setSellerComments(string $sellerComments): self
313
    {
314
        if (isset($this->params['Order']['SellerComments'])) {
315
            throw new LogicException('SellerComments is already set.');
316
        }
317
        $this->params['Order']['SellerComments'] = $sellerComments;
318
319
        return $this;
320
    }
321
322
    /**
323
     * 社内メモ
@@ 923-931 (lines=9) @@
920
     * @param string $shipInvoiceNumber1
921
     * @return self
922
     */
923
    public function setShipInvoiceNumber1(string $shipInvoiceNumber1): self
924
    {
925
        if (isset($this->params['Ship']['ShipInvoiceNumber1'])) {
926
            throw new LogicException('ShipInvoiceNumber1 is already set.');
927
        }
928
        $this->params['Ship']['ShipInvoiceNumber1'] = $shipInvoiceNumber1;
929
930
        return $this;
931
    }
932
933
    /**
934
     * 配送伝票番号2
@@ 941-949 (lines=9) @@
938
     * @param string $shipInvoiceNumber2
939
     * @return self
940
     */
941
    public function setShipInvoiceNumber2(string $shipInvoiceNumber2): self
942
    {
943
        if (isset($this->params['Ship']['ShipInvoiceNumber2'])) {
944
            throw new LogicException('ShipInvoiceNumber2 is already set.');
945
        }
946
        $this->params['Ship']['ShipInvoiceNumber2'] = $shipInvoiceNumber2;
947
948
        return $this;
949
    }
950
951
    /**
952
     * 配送会社URL