Code Duplication    Length = 9-9 lines in 5 locations

src/YahooShoppingJp/Request/UpdateOrderInfoRequest.php 5 locations

@@ 226-234 (lines=9) @@
223
     * @param string $printSlipTime
224
     * @return UpdateOrderInfoRequest
225
     */
226
    public function setPrintSlipTime(\DateTimeImmutable $printSlipTime): self
227
    {
228
        if (isset($this->params['Order']['PrintSlipTime'])) {
229
            throw new LogicException('PrintSlipTime is already set.');
230
        }
231
        $this->params['Order']['PrintSlipTime'] = $printSlipTime->format('YmdHis');
232
233
        return $this;
234
    }
235
236
    /**
237
     * 納品書出力時刻
@@ 244-252 (lines=9) @@
241
     * @param \DateTimeImmutable $printDeliveryTime
242
     * @return UpdateOrderInfoRequest
243
     */
244
    public function setPrintDeliveryTime(\DateTimeImmutable $printDeliveryTime): self
245
    {
246
        if (isset($this->params['Order']['PrintDeliveryTime'])) {
247
            throw new LogicException('PrintDeliveryTime is already set.');
248
        }
249
        $this->params['Order']['PrintDeliveryTime'] = $printDeliveryTime->format('YmdHis');
250
251
        return $this;
252
    }
253
254
    /**
255
     * 請求書出力時刻
@@ 262-270 (lines=9) @@
259
     * @param \DateTimeImmutable $printBillTime
260
     * @return UpdateOrderInfoRequest
261
     */
262
    public function setPrintBillTime(\DateTimeImmutable $printBillTime): self
263
    {
264
        if (isset($this->params['Order']['PrintBillTime'])) {
265
            throw new LogicException('PrintBillTime is already set.');
266
        }
267
        $this->params['Order']['PrintBillTime'] = $printBillTime->format('YmdHis');
268
269
        return $this;
270
    }
271
272
    /**
273
     * バイヤーコメント
@@ 316-324 (lines=9) @@
313
     * @param string $notes
314
     * @return UpdateOrderInfoRequest
315
     */
316
    public function setNotes(string $notes): self
317
    {
318
        if (isset($this->params['Order']['Notes'])) {
319
            throw new LogicException('Notes is already set.');
320
        }
321
        $this->params['Order']['Notes'] = $notes;
322
323
        return $this;
324
    }
325
326
    /**
327
     * 返金ステータス
@@ 348-356 (lines=9) @@
345
     * @param \DateTimeImmutable $printBillTime
346
     * @return UpdateOrderInfoRequest
347
     */
348
    public function setPayDate(\DateTimeImmutable $payDate): self
349
    {
350
        if (isset($this->params['Order']['PayDate'])) {
351
            throw new LogicException('PayDate is already set.');
352
        }
353
        $this->params['Order']['PayDate'] = $payDate->format('YmdHis');
354
355
        return $this;
356
    }
357
}
358