Code Duplication    Length = 9-10 lines in 9 locations

src/YahooShoppingJp/Request/GetOrderInfoRequest.php 1 location

@@ 102-111 (lines=10) @@
99
     * @param string $orderId
100
     * @return self
101
     */
102
    public function setOrderId(string $orderId): self
103
    {
104
        if (isset($this->params['Target']['OrderId'])) {
105
            throw new LogicException('OrderId is already set.');
106
        }
107
108
        $this->params['Target']['OrderId'] = $orderId;
109
110
        return $this;
111
    }
112
113
}
114

src/YahooShoppingJp/Request/UpdateOrderStatusRequest.php 3 locations

@@ 91-100 (lines=10) @@
88
     * @param string $orderId
89
     * @return self
90
     */
91
    public function setOrderId(string $orderId): self
92
    {
93
        if (isset($this->params['Target']['OrderId'])) {
94
            throw new LogicException('OrderId is already set.');
95
        }
96
97
        $this->params['Target']['OrderId'] = $orderId;
98
99
        return $this;
100
    }
101
102
    /**
103
     * 【必須】ポイント確定要否
@@ 111-120 (lines=10) @@
108
     * @param bool $isPointFix
109
     * @return self
110
     */
111
    public function setIsPointFix(bool $isPointFix): self
112
    {
113
        if (isset($this->params['Target']['IsPointFix'])) {
114
            throw new LogicException('IsPointFix is already set.');
115
        }
116
117
        $this->params['Target']['IsPointFix'] = ($isPointFix ? 'true' : 'false');
118
119
        return $this;
120
    }
121
122
    /**
123
     * 【必須】注文ステータス
@@ 144-153 (lines=10) @@
141
     * @param string $operationUser
142
     * @return self
143
     */
144
    public function setOperationUser(string $operationUser): self
145
    {
146
        if (isset($this->params['Target']['OperationUser'])) {
147
            throw new LogicException('OperationUser is already set.');
148
        }
149
150
        $this->params['Target']['OperationUser'] = $operationUser;
151
152
        return $this;
153
    }
154
155
    /**
156
     * キャンセル理由

src/YahooShoppingJp/Request/UpdateOrderShippingStatusRequest.php 3 locations

@@ 92-101 (lines=10) @@
89
     * @param string $orderId
90
     * @return self
91
     */
92
    public function setOrderId(string $orderId): self
93
    {
94
        if (isset($this->params['Target']['OrderId'])) {
95
            throw new LogicException('OrderId is already set.');
96
        }
97
98
        $this->params['Target']['OrderId'] = $orderId;
99
100
        return $this;
101
    }
102
103
    /**
104
     * @param bool $isPointFix
@@ 107-116 (lines=10) @@
104
     * @param bool $isPointFix
105
     * @return self
106
     */
107
    public function setIsPointFix(bool $isPointFix): self
108
    {
109
        if (isset($this->params['Target']['IsPointFix'])) {
110
            throw new LogicException('IsPointFix is already set.');
111
        }
112
113
        $this->params['Target']['IsPointFix'] = $isPointFix ? 'true' : 'false';
114
115
        return $this;
116
    }
117
118
    /**
119
     * @param string $operationUser
@@ 122-131 (lines=10) @@
119
     * @param string $operationUser
120
     * @return self
121
     */
122
    public function setOperationUser(string $operationUser): self
123
    {
124
        if (isset($this->params['Target']['OperationUser'])) {
125
            throw new LogicException('OperationUser is already set.');
126
        }
127
128
        $this->params['Target']['OperationUser'] = $operationUser;
129
130
        return $this;
131
    }
132
133
    /**
134
     * @param ShipStatus $shipStatus

src/YahooShoppingJp/Request/UpdateOrderInfoRequest.php 2 locations

@@ 62-70 (lines=9) @@
59
     * @param string $orderId
60
     * @return UpdateOrderInfoRequest
61
     */
62
    public function setOrderId(string $orderId): self
63
    {
64
        if (isset($this->params['Target']['OrderId'])) {
65
            throw new LogicException('OrderId is already set.');
66
        }
67
        $this->params['Target']['OrderId'] = $orderId;
68
69
        return $this;
70
    }
71
72
    /**
73
     * [必須]ストアアカウント
@@ 95-103 (lines=9) @@
92
     * @param string $operationUser
93
     * @return UpdateOrderInfoRequest
94
     */
95
    public function setOperationUser(string $operationUser): self
96
    {
97
        if (isset($this->params['Target']['OperationUser'])) {
98
            throw new LogicException('OperationUser is already set.');
99
        }
100
        $this->params['Target']['OperationUser'] = $operationUser;
101
102
        return $this;
103
    }
104
105
    /**
106
     * 閲覧済みフラグ