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

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