Code Duplication    Length = 10-10 lines in 7 locations

src/YahooShoppingJp/Request/GetOrderInfoRequest.php 1 location

@@ 66-75 (lines=10) @@
63
     * @param string $orderId
64
     * @return self
65
     */
66
    public function setOrderId(string $orderId): self
67
    {
68
        if (isset($this->params['Target']['OrderId'])) {
69
            throw new LogicException('OrderId is already set.');
70
        }
71
72
        $this->params['Target']['OrderId'] = $orderId;
73
74
        return $this;
75
    }
76
77
    /**
78
     * @return array

src/YahooShoppingJp/Request/UpdateOrderShippingStatusRequest.php 3 locations

@@ 44-53 (lines=10) @@
41
     * @param string $orderId
42
     * @return self
43
     */
44
    public function setOrderId(string $orderId): self
45
    {
46
        if (isset($this->params['Target']['OrderId'])) {
47
            throw new LogicException('OrderId is already set.');
48
        }
49
50
        $this->params['Target']['OrderId'] = $orderId;
51
52
        return $this;
53
    }
54
55
    /**
56
     * @param bool $isPointFix
@@ 59-68 (lines=10) @@
56
     * @param bool $isPointFix
57
     * @return self
58
     */
59
    public function setIsPointFix(bool $isPointFix): self
60
    {
61
        if (isset($this->params['Target']['IsPointFix'])) {
62
            throw new LogicException('IsPointFix is already set.');
63
        }
64
65
        $this->params['Target']['IsPointFix'] = $isPointFix ? 'true' : 'false';
66
67
        return $this;
68
    }
69
70
    /**
71
     * @param string $operationUser
@@ 74-83 (lines=10) @@
71
     * @param string $operationUser
72
     * @return self
73
     */
74
    public function setOperationUser(string $operationUser): self
75
    {
76
        if (isset($this->params['Target']['OperationUser'])) {
77
            throw new LogicException('OperationUser is already set.');
78
        }
79
80
        $this->params['Target']['OperationUser'] = $operationUser;
81
82
        return $this;
83
    }
84
85
    /**
86
     * @param ShipStatus $shipStatus

src/YahooShoppingJp/Request/UpdateOrderStatusRequest.php 3 locations

@@ 61-70 (lines=10) @@
58
     * @param string $orderId
59
     * @return self
60
     */
61
    public function setOrderId(string $orderId): self
62
    {
63
        if (isset($this->params['Target']['OrderId'])) {
64
            throw new LogicException('OrderId is already set.');
65
        }
66
67
        $this->params['Target']['OrderId'] = $orderId;
68
69
        return $this;
70
    }
71
72
    /**
73
     * 【必須】ポイント確定要否
@@ 81-90 (lines=10) @@
78
     * @param bool $isPointFix
79
     * @return self
80
     */
81
    public function setIsPointFix(bool $isPointFix): self
82
    {
83
        if (isset($this->params['Target']['IsPointFix'])) {
84
            throw new LogicException('IsPointFix is already set.');
85
        }
86
87
        $this->params['Target']['IsPointFix'] = ($isPointFix ? 'true' : 'false');
88
89
        return $this;
90
    }
91
92
    /**
93
     * 【必須】注文ステータス
@@ 114-123 (lines=10) @@
111
     * @param string $operationUser
112
     * @return self
113
     */
114
    public function setOperationUser(string $operationUser): self
115
    {
116
        if (isset($this->params['Target']['OperationUser'])) {
117
            throw new LogicException('OperationUser is already set.');
118
        }
119
120
        $this->params['Target']['OperationUser'] = $operationUser;
121
122
        return $this;
123
    }
124
125
    /**
126
     * キャンセル理由